components / 15

marked toast

feedback should arrive like a note in the margin. quick, human, and clear about what changed.

shadcnnpx shadcn@latest add berkantay/cheez/marked-toast
position
character
frame
live

status desk

click any signal
behavior

full lifecycle

same manager, different jobs
promise

one notification moves from loading to success without jumping position.

update

keep a stable id while the title, copy, timing, and drawing change.

action

attach a native button with the same keyboard and screen-reader behavior.

persistent

timeout zero keeps important feedback present until it is dismissed.

queue

fire more than the visible limit. older signals wait without breaking order.

dismiss all

the manager can close one known id or clear the whole stack at once.

composition

one provider

producers can live anywhere below it
<MarkedToastProvider
  position="bottom-right"
  character="rushed"
  frameMark="rounded-box"
>
  <App />
</MarkedToastProvider>

const toast = useMarkedToast()
toast.add({
  type: "success",
  title: "changes published",
  description: "the new version is live.",
})
reference

api

provider and manager
partproptypedefaultpurpose
Providertimeoutnumber5000default dismissal delay; zero persists
Providerlimitnumber3visible stack size before older items hide
ProviderpositionMarkedToastPosition"bottom-right"viewport corner
ProvidercharacterCheezCharacter"rushed"drawing personality
ProviderframeMarkCheezType"rounded-box"notification boundary
Providerthicknessnumber1all pen weight
ProvidertoastManagerToastManagerdispatch outside React
addtitleReactNodeprimary announcement
adddescriptionReactNodesupporting copy
addtypeMarkedToastType"default"status drawing and ink
addtimeoutnumberproviderper-toast dismissal delay
addpriority"low" | "high""low"screen-reader announcement urgency
addactionPropsbutton propsoptional accessible action
adddataMarkedToastDataper-toast mark and color overrides
managerupdate(id, options) => voidreplace a toast in place
managerpromise(promise, states) => Promiseloading, success, and error lifecycle
managerclose(id?) => voiddismiss one or every toast

behavior notes

  • the visible boundary, status glyph, and close symbol are all Cheez marks
  • hovering or focusing the viewport unfolds the stack
  • swipe away follows the viewport edge and keyboard focus remains intact
  • high priority uses an urgent live-region announcement
  • promise states update one toast instead of producing three competing messages
  • reduced-motion preferences shorten transitions while keeping state changes legible