Skip to content

No.576 · Buttons· New

Plan Pill Button

The quiet pill that closes a pricing card: a short, solid capsule with a medium-weight label. On hover a soft halo of its own colour opens round it, and a press sinks it slightly. In white, ink, frosted glass and lit teal.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: White

Build a quiet pill button of the kind that closes a pricing card: short, solid, one medium-weight label, no icon by default. Pure CSS. Shape. A native button 36px tall by default (small 30px, large 44px). Everything follows the height: horizontal padding 62% of it, a minimum width of 4.3 times it, the label at 36% of it in a medium (500) grotesk with −0.005em tracking, and a fully round end. The default label is "Choose Plan". States. Hover: a halo opens round the pill, a ring 12% of the height wide in the pill's own halo colour, over 200ms. Pressed: scale 0.97. Focus-visible: a 2px pale cyan (#a8dcee) outline, 3px out. Disabled: 45% opacity, no halo. Production behaviour: it is a plain button with real text; reduced motion removes the transitions; forced-colours mode gives it a border. Selected variant — White (white): A white pill (#ffffff) with near-black text (#111111), for dark cards on black; the hover halo is the pill colour at 18%. Select it with the look option set to "white". This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Hover opens a soft halo round the pill; press sinks it. Tab reaches it. Motion: Halo 200ms; press 160ms. Accessibility: A native button with real text and a visible focus outline. Each look keeps its label above 4.5:1 on its own fill. Responsive behavior: Three heights, 30, 36 and 44px; every proportion follows the height. Touch: A press sinks it; nothing depends on hover. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Hover opens a soft halo round the pill; press sinks it. Tab reaches it.
Motion
Halo 200ms; press 160ms.
Accessibility
A native button with real text and a visible focus outline. Each look keeps its label above 4.5:1 on its own fill.
Responsive
Three heights, 30, 36 and 44px; every proportion follows the height.
On touch
A press sinks it; nothing depends on hover.