Skip to content

LinkModelView

Overview

Renders a VUEDA Button control that navigates to a named model view (such as read, update, or a custom action) for a given app, model, and optional pk. Renders as a link by default, or as a standard button when the button prop is set.

Styling resolves in two modes. In action styling mode (any of primary, tone, or emphasis is set) the button's look comes from the two-layer action mapping (see utils/actionVariant.js): the action's intrinsic tone (a delete/destroy action is destructive) crossed with the placement emphasis (emphasis, or fill when primary). Otherwise it renders as the plain navigation affordance: primary fill for button, primary link for anchor links.

Props

NameTypeRequiredDefaultDescription
appstringyesDjango app label that owns the model.
modelstringyesDjango model name used to build the target route.
pkstring|number|arrayundefinedPrimary key of the model instance to navigate to.
viewstring|array|object"read"Named view (or view descriptor) to navigate to, such as "read" or "update".
labelstringundefinedButton label text; omit when using an icon-only button.
buttonbooleanfalseWhen true, renders as a standard button instead of a link-styled button.
disabledbooleanfalseWhen true, disables the button and prevents navigation.
primarybooleanfalseWhen true, promotes this action to the filled hero CTA for its view.
tonestringundefinedExplicit tone override (the color axis); wins over the action's intrinsic tone.
emphasisstringundefinedPlacement emphasis when not promoted; setting it switches the button into action styling mode.

Slots

default

Slot.

Source

client/lib/navigation/link-model-view/LinkModelView.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2