Skip to content
PanelUI KitCompany design system
0.3.0-alpha.3
ComponentsOverlays

Dialog

Baseline

Focus attention on a short task without leaving the page.

panel-ui-kit/dialog
Example

Tab to explore focus and keyboard behavior.

example.tsx
'use client'; import 'panel-ui-kit/styles.css';import { PanelUiTheme } from 'panel-ui-kit/theme';import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose } from 'panel-ui-kit/dialog';import { Button } from 'panel-ui-kit/button'; export function Example() {  return (    <PanelUiTheme theme="neutral" motion={{"mode":"full","durationScale":1,"intensity":1}}>      <Dialog>        <DialogTrigger asChild><Button>Edit preferences</Button></DialogTrigger>        <DialogContent closeLabel="Close dialog">          <DialogHeader>            <DialogTitle>Your preferences</DialogTitle>            <DialogDescription>Choose what works for you.</DialogDescription>          </DialogHeader>          <DialogFooter>            <DialogClose asChild><Button>Done</Button></DialogClose>          </DialogFooter>        </DialogContent>      </Dialog>    </PanelUiTheme>  );}

When to use

Supply a title, useful description and a clear close label. Keep the task small and let people cancel.

Keyboard

Focus moves into the dialog. Tab stays inside. Escape closes it and returns focus to the trigger.

Properties

PropertyValuesDefault
openbooleanCaller owned
onOpenChange(open: boolean) => void—
closeLabelNonempty string on ContentRequired
motionfull · reduced · off · objectInherited
Panel UI KitShared components. Product identity.