Documentation

  • 312 sections
  • Solid
  • Tailwind or StyleX

Popover

An anchored panel below its trigger. Bring your own trigger and content. Escape or an outside press calls onClose.

open
Typeboolean Defaultnone
align
Type"start" | "center" | "end" Default"start"
onClose
Type() => void Defaultnone
trigger
TypeJSX.Element Defaultnone
children
Typecontent Defaultnone
Add it to your project
One line copies DitherPopover, DitherButton and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPopover DitherButton

Context menu

A right-click menu portalled to the pointer. It shares Menu's items and keyboard behavior, and Escape or any outside press dismisses it.

items
TypeContextMenuItem[] Defaultnone
onSelect
Type(label: string) => void Defaultnone
children
Typecontent Defaultnone
Add it to your project
One line copies DitherContextMenu and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherContextMenu

Tooltip

A delayed hover tip above its target. It also shows on focus and hides on leave, blur, or Escape. No transition under reduced motion.

text
Typestring Defaultnone
delay
Typenumber Default300
children
Typecontent Defaultnone
Add it to your project
One line copies DitherTooltip, DitherBadge and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherTooltip DitherBadge

Preview card

A hover preview for rich content. It opens after a delay on hover or focus, and a short close delay lets the pointer travel into the card.

delay
Typenumber Default400
trigger
TypeJSX.Element Defaultnone
children
Typecontent Defaultnone
Add it to your project
One line copies DitherAvatar, DitherPreviewCard and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherAvatar DitherPreviewCard

Command

The ⌘K palette: type to filter, arrows to walk, Enter runs, Escape leaves. Groups follow first appearance; the hotkey stays in your hands. Try ⌘K right here.

open
Typeboolean (onClose asks to leave) Defaultrequired
items
Type{ value, label, group?, kbd? }[] Defaultrequired
placeholder
Typestring Default"Type a command…"
empty
Typestring (no-match line) | ({ query }) => JSX.Element, drawn in its place Default"No results."
class
Typestring Defaultnone
onClose
Type() => void Defaultnone
onSelect
Type(value), fired before close Defaultnone
Add it to your project
One line copies DitherButton, DitherCommand and every kit file they need into your project, in the styling system picked in the header.
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherButton DitherCommand