TotalBase
Widgets

Overlays

Modals, slideovers, drawers, popovers, tooltips and dropdown menus.

In the admin: Design form › Widgets › Overlays

Widget
Modal, Slideover, Drawercontent that opens over the page, by a button or by code: Sign, then the signature pad in a modal
Popover, Tooltipsmall content anchored to a trigger
Dropdown menua menu whose items run functions of the Code

UModal · Nuxt UI

A dialog over the page.

Props

PropCodeTakes
Sizesizesm, md, lg, xlIts width, from sm to xl - unset, Nuxt UI's own.
FullscreenfullscreenCovers the whole screen.
Close on outside clickdismissibleCloses when the viewer clicks outside it.
Close buttoncloseAn ✕ in its corner that closes it.
Scroll the whole modalscrollableThe whole modal scrolls, not only its body.

Also: Title title (ƒ), Description description (ƒ).

Slots

SlotCode
Headerheaderedited in its own canvas
Bodybodyedited in its own canvas
Footerfooteredited in its own canvas

Events

EventCodeReceives
Opened / closedupdate:open{ open }
Closed (after its animation)after:leave

Methods

Called from Code as dataview.controls.<name>.<method>().

MethodCode
Openopen()Opens it
Closeclose()Closes it

Example

{
  "widget": "UModal",
  "name": "signModal",
  "props": {
    "title": "Customer's signature"
  },
  "children": [
    {
      "widget": "TSignature",
      "name": "signature",
      "bindings": {
        "modelValue": {
          "variable": "signature"
        }
      }
    },
    {
      "widget": "UButton",
      "slot": "footer",
      "props": {
        "label": "Accept"
      },
      "emits": {
        "click": "onAcceptSignature"
      }
    }
  ]
}

Slideover

USlideover · Nuxt UI

A panel sliding in from an edge.

Props

PropCodeTakes
Sidesideright, left, top, bottom
Sizesizesm, md, lg, xlIts width, from sm to xl - unset, Nuxt UI's own.
InsetinsetFloats with a margin from the edge of the screen.
Close on outside clickdismissibleCloses when the viewer clicks outside it.
Close buttoncloseAn ✕ in its corner that closes it.

Also: Title title (ƒ), Description description (ƒ).

Slots

SlotCode
Headerheaderedited in its own canvas
Bodybodyedited in its own canvas
Footerfooteredited in its own canvas

Events

EventCodeReceives
Opened / closedupdate:open{ open }
Closed (after its animation)after:leave

Methods

Called from Code as dataview.controls.<name>.<method>().

MethodCode
Openopen()Opens it
Closeclose()Closes it

Drawer

TDrawer · TotalBase

A panel rising from the bottom - TotalBase's own drawer, for working on something with room.

Props

PropCodeTakes
Sizesizesm, md, lg, xlIts width, from sm to xl - lg by default, as every drawer in TotalBase.
Expand buttonexpandabledefault trueA button that grows it to almost the whole screen.
Open expandedstartExpandedOpens at almost the whole screen - for content that needs the room.

Also: Title title (ƒ), Description description (ƒ).

Slots

SlotCode
Bodybodyedited in its own canvas
Footerfooteredited in its own canvas

Events

EventCodeReceives
Opened / closedupdate:open{ open }

Methods

Called from Code as dataview.controls.<name>.<method>().

MethodCode
Openopen()Opens it
Closeclose()Closes it

Popover

UPopover · Nuxt UI

A small panel anchored to its trigger.

Props

PropCodeTakes
Opens onmodeclick, hover
ArrowarrowA small arrow pointing at what opened it.

Slots

SlotCode
Triggerdefaultedited in place
Contentcontentedited in its own canvas

Events

EventCodeReceives
Opened / closedupdate:open{ open }

Methods

Called from Code as dataview.controls.<name>.<method>().

MethodCode
Openopen()Opens it
Closeclose()Closes it

Tooltip

UTooltip · Nuxt UI

A hint shown over its content on hover.

Props

PropCodeTakes
ArrowarrowA small arrow pointing at what opened it.

Also: Text text (ƒ).

Slots

SlotCode
Contentdefaultedited in place

UDropdownMenu · Nuxt UI

A menu of actions under its trigger - each item runs a Code function.

Props

PropCodeTakes
ItemsitemsEach runs its Code function - Cancel off once it's paid, Delete only for some: a formula over the page.
Sizesizexs, sm, md, lg, xlFrom xs to xl - Default is md.
DisableddisabledƒShown greyed out - it can't be used.

Slots

SlotCode
Triggerdefaultedited in place

Events

EventCodeReceives
Opened / closedupdate:open{ open }

Next steps

  • Widgets: how a widget works, and every one of them.
  • Variables: what widgets show and change.