ns-ui

Banner Tear Stub

A dismissible notice with a perforated edge: dismissing rips the panel off along the perforation, leaving a small permanent stub that reopens it.

Use when a dismissible notice the user may want back, since dismissing rips it off along a perforation and leaves a small permanent stub that reopens it rather than removing it with no route to recovery; pick toast-gravity-stack instead when the notice is transient and self-dismissing, or empty-state-dashed when the panel is a persistent empty region with a CTA rather than a notice.

Install

npx shadcn add https://design.helpmarq.com/r/banner-tear-stub.json
  • banner
  • notice
  • dismissible
  • reopenable
  • alert
  • perforation
  • micro-interaction
  • accessibility

ns-ui / banner-tear-stub — dismiss, then click the stub to reopen

Scheduled maintenance

This workspace will be read-only for about ten minutes starting at 02:00 UTC tonight.

A small tab stays after dismissing so you can reopen this notice.

Props

PropTypeDefaultDescription
titlestringThe notice's title. Also becomes the stub's accessible name once torn off ("Reopen: <title>").
description?ReactNodeSupporting copy shown under the title.
variant?"info" | "urgent"Swaps role=status for role=alert and the default icon for the more severe glyph. @default "info"
icon?ReactNodeCustom icon replacing the built-in glyph. Always rendered aria-hidden — the accessible name comes from `title` and `dismissLabel`, not the icon.
open?booleanControlled open state. Omit to let the component manage its own.
defaultOpen?booleanInitial open state when uncontrolled. @default true
onOpenChange?(open: boolean) => voidFires after a dismiss or a reopen, from a click or the keyboard.
dismissLabel?stringAccessible name (and visible label) for the dismiss control. @default "Dismiss"
className?string