Skip to content

    Browse components

    Rip Stub

    An event ticket whose perforated stub you pull against rubber-band tension until it rips free and tumbles away, stamping a confirmation onto the ticket.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/rip-stub

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/rip-stub.json

    Usage

    import { RipStub } from "@/components/ui/rip-stub";
    
    <RipStub title="Neon Nights" seat="GA 042" onTear={() => checkIn(ticketId)} />

    Props

    PropTypeDefaultDescription
    titlestring"Neon Nights"Event name.
    subtitlestring"Warehouse 9 · Live set"Venue line.
    datestring"Sat 14 Jun"Date field.
    timestring"21:00"Doors field.
    seatstring"GA 042"Seat, also printed on the stub.
    confirmationstring"You're in!"Stamp shown after tearing.
    accentstring"#fbbf24"Stub and stamp color.
    thresholdnumber90Px of pull needed before release tears the stub.
    onTearReactNode—Called once when the stub is torn off.
    classNamestring—Extra classes for the root element.