Stub Pass
Web (React)
A perforated card with a primary-ink stub you can drag and tear clean off.
The body takes the card token and the stub is printed in the theme's primary, so the perforation reads as a clear seam in any palette. The card tilts toward the pointer and the stub resists before it rips.
Admit one · Evening readingThe Quiet PressHall B · 19:30
Seat14C
Installation
CLI
npx @modus-ui/cli add stub-passManual
- Copy the code from the component tab.
- Create a file at
components/ui/stub-pass.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | any | null | - |
| stub | any | null | - |
| image | string | "" | - |
| imageAlt | string | "" | - |
| scrim | boolean | true | - |
| imageRadius | number | 8 | - |
| orientation | string | "horizontal" | - |
| torn | any | - | - |
| defaultTorn | boolean | false | - |
| onTear | any | - | - |
| width | number | 460 | - |
| height | number | 250 | - |
| stubSize | number | 150 | - |
| radius | number | 16 | - |
| holes | number | 12 | - |
| holeSize | number | 6 | - |
| notch | number | 3 | - |
| roughness | number | 0 | - |
| tearAngle | number | 30 | - |
| stretch | number | 30 | - |
| resistance | number | 0.45 | - |
| rotate | number | 4 | - |
| tilt | boolean | true | - |
| tiltMax | number | 9 | - |
| tiltReach | number | 260 | - |
| parallax | number | 6 | - |
| perspective | number | 1000 | - |
| background | string | "hsl(var(--card))" | - |
| color | string | "hsl(var(--foreground))" | - |
| border | boolean | true | - |
| borderColor | string | "" | - |
| borderWidth | number | 1 | - |
| stubBackground | string | "hsl(var(--primary))" | - |
| recenter | boolean | true | - |
| disabled | boolean | false | - |
| ariaLabel | string | "Tear off the stub" | - |
Comments