ParallaxTicket

Tilts toward the pointer with layers drifting at different depths. Click to flip to the barcode. Cards.

Open playground

LIS to OSL

Flight 427

Gate
B12
Seat
14A
Boards
09:40

Scan at the gate

About

ParallaxTicket is a React component in the Cards category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ParallaxTicket } from "@ashutoshswamy/smoui" and set title, fields, palette among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { ParallaxTicket } from "@ashutoshswamy/smoui";

<ParallaxTicket
  title="LIS to OSL"
  subtitle="Flight 427"
  fields={[{ label: "Gate", value: "B12" }, { label: "Seat", value: "14A" }]}
/>

Props 4

title / subtitle

Front text.

string
fields

Small facts along the bottom.

{ label: string; value: string }[]
palette

0-7, mesh colors. Defaults to a hash of the title.

number
backText

Caption under the barcode on the back.

stringdefault "Scan at the gate"