DevCanvas

components/dev/Canvas.vue

Interactive documentation wrapper with adminProps-driven prop editor, titled backdrop, and source file location.

Default
Hello World
components/ux/Button.vue
Admin At Top
Controls appear above this content
Custom Background
White text on dark backdrop
components/dev/Canvas.vue

Usage

<DevCanvas title = "—" loc = "—" route = "—" :adminProps = "adminProps" :adminAtTop = "false" bg = "—" > Content here </DevCanvas>

Props

PropTypeDefaultDescription
titleString''Section heading (becomes anchor ID)
locString''Source file path (click to copy)
routeString''App route shown in header
adminPropsObjectnullReactive ref for prop editor
adminAtTopBooleanfalsePosition editor above demo
bgString''Backdrop CSS class override

Events

EventDescription
update:adminPropsWhen props are edited

Slots

SlotDescription
defaultThe component demo

Related