Flick Notice
Web (React)
A card-stock notice that slides in, burns down a thin primary fuse and flicks away under a swipe.
The surface follows the theme's card and border tokens with a serif title, so it reads as a slip of paper rather than a system pill. Drag it past the swipe distance to dismiss, or hover to pause the fuse.
Draft filed to the folio
Swipe it away, or let the fuse run out.
Installation
CLI
npx @modus-ui/cli add flick-noticeManual
- Copy the code from the component tab.
- Create a file at
components/ui/flick-notice.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Draft filed to the folio" | Serif headline. |
| description | string | "" | Supporting line. |
| icon | any | - | Optional leading icon. |
| actionLabel | string | "" | Label of the action button; empty hides it. |
| onAction | any | - | Called when the action is pressed. |
| open | boolean | true | Whether the notice is shown. |
| onClose | any | - | Called when the notice leaves. |
| background | string | "hsl(var(--card))" | Card colour. |
| color | string | "hsl(var(--foreground))" | Text colour. |
| fuseColor | string | "hsl(var(--primary))" | Fuse colour. |
| width | number | 356 | Width in pixels. |
| radius | number | 12 | Corner radius in pixels. |
| slideMs | number | 400 | Entrance duration in milliseconds. |
| settleBounce | number | 0.2 | Entrance spring bounce. |
| swipeDistance | number | 40 | Drag distance that dismisses, in pixels. |
| duration | number | 4000 | Time before it leaves, in milliseconds; 0 stays. |
| fuse | string | "bottom" | Fuse edge: "top", "bottom" or "none". |
| pauseOnHover | boolean | true | Pauses the fuse while hovered. |
| closeButton | boolean | false | Shows a close button. |
| inline | boolean | false | Renders in flow instead of fixed to the corner. |
| dismissible | boolean | true | Allows swiping away. |
Comments