jbmui

Ticket

  • UI
  • adjustable

Admission-style surface with a colored header, flexible body, and perforated footer stub.

ADMIT ONE · UNA BUENA IDEA
Un lugar para crear.

Trae tu curiosidad. Lo demás lo construimos juntos.

tacosdedatos · Nos vemos ahí.
orden de trabajo
Migrar los pagos

Del cliente anterior al nuevo.

Hecho es:
Las pruebas pasan.
El cliente viejo se elimina.

Install

npx shadcn@latest add @jbm/ticket

Needs the @jbm entry in components.json; see Install once.

Also installs @jbm/tokens.

Docs

Usage

Admission ticket
import { Ticket } from "@/jbm/ui/ticket"<Ticket header="ADMIT ONE · OCT 2026" stub="Tu nombre · Tu comunidad" tone="accent">  <h3>Un lugar para crear.</h3>  <p>Trae tu curiosidad.</p></Ticket>
Work order with the same slots
import { Ticket } from "@/jbm/ui/ticket"<Ticket header="orden de trabajo" stub={<>Hecho es:<br />Las pruebas pasan.</>}>  <h3>Migrar los pagos</h3>  <p>Del cliente anterior al nuevo.</p></Ticket>

Props

Stage
fluid

Width fills the container; height follows content: header band (14px padding × 2 + one 12px mono line), body (24px padding × 2 + children), and stub (16px padding × 2 + 12px × 1.5 lines), plus the card border. Set style.width for a fixed ticket.

A card-stock surface (shared card border, shadow, and radius tokens) with an optional ink or vermilion mono header band, a 24px-padded body for arbitrary children, and an optional stub below a dashed perforation line. Content semantics belong to the caller; div attributes pass through.

PropTypeDefaultDescription
headerReact.ReactNodenoneOptional header band content (12px mono, cream text). Omit (null/undefined) to hide the band.
stubReact.ReactNodenoneOptional footer stub content (12px dim mono) below a dashed line. Omit to hide.
tone"ink" | "accent""ink"Header band fill: "ink" or the vermilion "accent".

Also accepts React.HTMLAttributes<HTMLDivElement>.

QA checks

  • Toggle the Vermilion header control: the band switches between accent and ink while body and stub are unchanged.
  • Check the rounded corners clip the header band and the dashed perforation spans the full width above the stub.
  • Remove header or stub and confirm no empty band or dashed line remains.
  • Check long content on a narrow screen wraps inside the ticket (overflowWrap anywhere) and the surface border and shadow match Card.