components / 11

marked dialog

a deliberate interruption. the room goes quiet, then the boundary and meaning are drawn into place.

shadcnnpx shadcn@latest add berkantay/cheez/marked-dialog
live

playground

closed
size
character
panel
title
panel ink
title ink
dismissal
<MarkedDialog
  size="medium"
  character="rushed"
  frameMark="rounded-box"
  titleMark="underline"
>
  <MarkedDialogTrigger>open note</MarkedDialogTrigger>
  <MarkedDialogContent>
    <MarkedDialogHeader>
      <MarkedDialogTitle>before you publish</MarkedDialogTitle>
      <MarkedDialogDescription>
        this becomes visible to everyone.
      </MarkedDialogDescription>
    </MarkedDialogHeader>
    <MarkedDialogFooter>
      <MarkedDialogClose>got it</MarkedDialogClose>
    </MarkedDialogFooter>
  </MarkedDialogContent>
</MarkedDialog>
behavior

states

every card opens a real dialog
default
compact
wide
danger
no corner close
non-modal
composition

name a new mark

dialog + field + actions
new collection

dialogs should contain a decision, not an entire product.

reference

api

compound parts, one shared drawing voice
partproptypedefaultpurpose
Rootopenbooleancontrolled open state
RootdefaultOpenbooleanfalseuncontrolled initial state
RootonOpenChangefunctionopen state callback with reason
Rootmodalboolean | "trap-focus"truefocus and outside interaction model
RootdisablePointerDismissalbooleanfalseignore outside presses
Rootsize"small" | "medium" | "large""medium"panel width and spacing
RootframeMarkCheezType"rounded-box"drawn panel boundary
RootframeColorstring"#8f74ff"boundary ink
RoottitleMarkCheezType"underline"title emphasis
RoottitleColorstring"#b7ff3c"title ink
RootcloseColorstring"#ff5fa2"close glyph ink
Rootcharacter"calm" | "rushed" | "chaotic""rushed"drawing personality
ContentinitialFocusboolean | ref | functiontrueopening focus target
ContentfinalFocusboolean | ref | functiontrueclosing focus target
ContentshowClosebooleantruecorner close glyph
ContentkeepMountedbooleanfalsepreserve portal contents
TriggermarkCheezType"rounded-box"trigger interaction mark
Triggermarkedbooleanforce mark visibility
TitlemarkCheezTyperoot valuelocal title override
ClosemarkCheezType"cross"icon glyph override

behavior notes

  • focus moves inside on open and returns to the trigger on close
  • Escape closes unless the open change is prevented
  • modal mode traps focus and locks document scrolling
  • outside press behavior remains configurable
  • the corner close control is always available to touch screen readers
  • reduced-motion users receive the finished drawing without transition movement