threshold · , desktop 1440px
Desktop 320 768 1280
Light Dark
Open
When to use Use it on a pricing page with three tiers. It takes classes (name, monthly price as a number, what it admits, action), currency, locale, a recommended index, freeMonths and a controlled or default period. Variants foyer, aisle and tile. When not to use Prices are numbers and the yearly price is computed from free months. If you set yearly prices by hand use Steep ; for a kit or built product use Panelised .
Use Threshold for a membership or subscription with three tiers: the section is a cinema foyer
floor in terrazzo, brass strips divide the classes, names and prices are inlaid, and switching to
yearly grinds every field a pass deeper before the new prices appear.
CLI Manual
pnpm dlx shadcn@latest add @motionkit-pro/threshold
npx shadcn@latest add @motionkit-pro/threshold
yarn dlx shadcn@latest add @motionkit-pro/threshold
bunx --bun shadcn@latest add @motionkit-pro/threshold Requires an All-Access or Signature license and the @motionkit-pro registry with your token. See Installation .
The files land in components/sections/.
import { Inlay, Threshold } from "@/components/sections/threshold"
export default function Page () {
return (
< Threshold
content = {{
mark: { name: "The Regal" , from: "1931" , to: "2026" },
title : (
<>
Keep your seat < Inlay >all year.</ Inlay >
</>
),
classes: [
{
name: "Stalls" ,
monthly: 12 ,
admits: [ "Four films a month" ],
action: { label: "Join" , href: "/join/stalls" },
},
{
name: "Circle" ,
monthly: 20 ,
admits: [ "Eight films a month" ],
action: { label: "Join" , href: "/join/circle" },
},
{
name: "Box" ,
monthly: 35 ,
admits: [ "Every film" ],
action: { label: "Join" , href: "/join/box" },
},
],
}}
currency = "£"
locale = "en-GB"
recommended = { 1 }
/>
)
}
recommended picks the class with the brass star, freeMonths the months a yearly member does
not pay (2 by default), period / defaultPeriod / onPeriodChange the billing period.
Content Copy Anchor Link
Every text sits in one typed content prop; each key you pass replaces the default copy (a
single-screen cinema in Bombay).
Key Type Notes classes{ name, seats?, monthly, admits, action, stone? }[]Three tiers; monthly is a number, yearly is computed. stone sets the field's terrazzo. mark{ name, from?, to? } | nullWordmark inlaid in the threshold. titleReactNodeThe h2; wrap a phrase in <Inlay> for the brass-outlined terrazzo. ledeReactNodeLine under the title. recommendedLabelReactNodeText beside the star. periodLabelsRecord<"monthly" | "yearly", string>Labels of the period switch. periodLabelstringAccessible name of the switch. perRecord<"monthly" | "yearly", string>Unit after the price. periodNoteRecord<"monthly" | "yearly", ReactNode> | nullLine next to the switch, announced politely. detail({ period, perMonth, perYear, saved }) => ReactNodeLine under each price. footnoteReactNodeSmall print under every action.
foyer (default): three fields side by side. Preview it with ?demo=default.
aisle: three stacked bands, the price at the right end. Preview it with ?demo=aisle.
tile: stone only as a band carrying the inlaid names and prices; the lists sit on plain
cement. Preview it with ?demo=tile.
Every colour is a prop and takes any CSS colour: hex, RGB, HSL or OKLCH. ink is the text,
cream the light text and the plain cement of tile, brass the strips and outlines, oxblood
the inlaid letters and the solid action, jade a spare accent. door and inlay are terrazzo
mixes ({ cement, chips, size?, density? }); each class can bring its own stone.
< Threshold
colors = {{
ink: "#262a3a" ,
cream: "#eee8da" ,
brass: "#c9a043" ,
oxblood: "#6a2420" ,
jade: "#4f8f7a" ,
}}
/>
Segmented control (Interface components).
Shared helpers installed with it: use-prefers-reduced-motion, fx-glsl, fx-runtime, section-runtime.
The billing period is a segmented radio group with an accessible name; the note beside it is
announced politely.
Each class is a heading with a list of what it admits and one link; the recommended class is
named beside its star.
The terrazzo, the strips and the wiped stone are decorative and hidden from assistive
technology.
stack: the classes stack top to bottom. On touch screens one slow wipe crosses the floor on its
own; vertical scroll is never blocked.
A still floor with a half-dried wipe across the recommended class; a period change sets the new
prices at once, without the grind.
The floor (WebGL) is built the first time the section nears the viewport; the fields show their
flat cement until then.
One frame loop that stops off screen or in a hidden tab.
Own code is checked against the sections budget (pnpm size).
Technical sheet Motion
calm 260 ms · bounce 0
lively 400 ms · bounce 0.3
playful 540 ms · bounce 0.45 Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size Not measured yet · budget 16.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
Dependencies @radix-ui/react-radio-group motion ogl@1.0.11 Reduced motion A still floor with a half-dried wipe across the recommended class; a period change sets the new prices at once, without the grind.
Keyboard No keyboard interaction of its own.
Browsers Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)
Tests in CI Unit (runs) Reduced motion (runs) Interaction (not applicable) axe (WCAG 2.2 AA) (not applicable) Visual light/dark (not applicable) shadcn install (runs) 4× CPU smoothness (runs)