Overlays

Slideover

A panel that slides in over the page from a viewport edge, for larger contextual content — or, with `dock`, into the layout beside it.

vue
<UiSlideover />

Options

One block per prop — what it does, and what it looks like set.

Title

header slot — replaces title/description

Description

description is the secondary line under the title, framing what the panel is for before the reader scans its contents.

Side

side sets which edge the panel slides in from.

Size

size sets the panel's size along its cross axis — width for a left/right panel, height for a top/bottom one.

Inset

inset adds a margin around the panel and rounds all of its corners, instead of sitting flush against the screen edge.

:inset="false" (flush) removes the margin and rounded corners so the panel sits flush against the screen edge — purely visual, doesn't affect dismiss behavior.

Overlay

overlay renders a dimmed backdrop behind the panel.

Non-dismissible needs its own close control

Like Modal, :dismissible="false" disables both Escape and backdrop-click close on Slideover too — you must provide your own way to close it (e.g. a footer button) or it's stuck open.

Dismissible

dismissible is whether Escape and a click on the backdrop close the panel. It's on by default; turn it off for a slideover holding unsaved work, and pair it with closeButton when you want no way out except your own control.

Like Modal, pairs with :dismissible="false" if you need to force an explicit close action.

Close button

closeButton shows the cross in the header. Drop it only when something else in the panel closes it — with dismissible off as well, there'd be no way out at all.

Dock

dock slides the panel into the layout beside the page instead of over it, with no backdrop, so the page stays usable — pick another row and the panel just changes content. It needs a SlideoverOutlet in the layout (this site has one next to its content) and a wide enough viewport: true docks a md panel from xl (1280px). Below that, it's the usual overlay.

Docking needs both a viewport at least as wide as the dock breakpoint and a SlideoverOutlet somewhere in the layout. Without an outlet the panel silently stays an overlay (a dev-only warning says so).

Only one panel docks at a time: a second docked Slideover opening closes the first (it gets update:open(false)).

Docked, an outside click never closes the panel — the page is meant to stay usable. Escape (with focus inside) and the close button still do. There's no backdrop, no scroll lock and no focus trap, and the panel is a complementary region rather than a modal dialog.

The breakpoints are hard-coded to the preset's defaults (xl 1280px, 2xl 1536px, …). An app that overrides breakpoints in its UnoCSS config docks at the default widths regardless.

Open

default-open — starts open when uncontrolled

Renders open on mount — used sparingly here to avoid stacking slideovers.

Default open

defaultOpen starts the panel open when uncontrolled. Shown as source only here — a slideover that opened itself would cover this page.

Renders open on mount.


Examples

The component in real use: compositions that answer "how do I build X with this", rather than one prop at a time.

`side="right"` (default)

`side="top"`

`side="bottom"`


API Reference

Generated from the component's source — props, slots and emits as the component actually declares them.

Props

Prop
Type
Default
Description
string
—
The title displayed in the panel header.
string
—
The description displayed below the title in the panel header.
"left" | "right" | "top" | "bottom"
'right'
Which edge the panel slides in from.
"sm" | "md" | "lg" | "xl"
'md'
The panel's size along its cross axis — width for a left/right panel, height for a top/bottom one.
boolean
true
Adds a margin around the panel and rounds all of its corners, instead of sitting flush against the screen edge.
boolean
true
Renders a dimmed backdrop behind the panel.
boolean
true
Whether clicking the backdrop or pressing Escape closes the panel.
boolean
true
Shows the close button in the header.
boolean | "lg" | "xl" | "2xl" | "3xl" | "4xl"
false
Docks the panel into the page, beside the content, instead of floating over it — the page stays usable, so clicking another row can change what the panel shows. Applies when the viewport is at least this breakpoint wide AND the layout has a `SlideoverOutlet`; otherwise the panel is the normal overlay. `true` picks a breakpoint from `size` (sm/md: `xl`, lg: `2xl`, xl: `3xl`). Only `side="right"` docks. Docked, `overlay` and `inset` don't apply and only Escape (or the close button) closes it — an outside click never does.
boolean
—
Controls the open state for external `v-model:open` usage.
boolean
false
Initial open state when uncontrolled.

Slots

Slot
header
default
footer

Emits

Event
Payload
Description
update:open
[value: boolean]
—
update:docked
[value: boolean]
Whether the open panel is docked: fires when it opens docked, switches mode while open, or closes from docked.