Swing Price Tag

A luxury swing tag hanging from a brass rail on a waxed cord. Brush past it and it swings like a real, lightly damped pendulum that settles and sleeps; tap it and it twirls over to the back for composition, care symbols and an SKU barcode while a foil sheen catches the light.

Try it: Sweep the pointer across the tag to swing it; click (or Enter) to flip. ← → nudge the swing.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/swing-price-tag.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/swing-price-tag. You can also copy the source into components/ui/swing-price-tag.tsx (view on GitHub).

Usage

import { SwingPriceTag } from '@/components/ui/swing-price-tag'

Props

Component props
PropTypeDefaultNotes
brand / monogram / product / variantstring—Front-of-tag copy.
price / compareAt / badgestring'€248' / '€310' / 'Members −20%'Price, struck-through original and the pill at the bottom.
details / sku[label, value][] / string—Back-of-tag rows and barcode text.
flipped / defaultFlipped / onFlippedChangebooleanfalseControlled / uncontrolled side.
swingbooleantruePendulum physics from pointer movement and taps (off under reduced motion).

Dependencies

  • motion
  • Paper Fold Accordion

    FAQ rows that open like a folded letter: two creased paper leaves swing open in CSS 3D (the top from its hinge, the bottom a beat later from the crease), shadows lift off the paper as it flattens…

  • Signal Beam Diagram

    An integration map where light travels: sources fire gradient pulses along hairline S-curves into a glass hub, which relays them to destinations. Select a node to isolate its route and read what…

  • Tear-Stub Boarding Pass

    A frosted-glass boarding pass with a perforated stub. Drag the stub away and it resists, tears free with a ragged edge and tumbles out of frame while a "Boarded" stamp thumps onto the pass. Lays out…

  • World Clock Globe

    A dotted planet you can spin, lit by the real sun — the night side dims along a live terminator, a 24-hour ring tracks the chosen city and every card ticks its own local time. Canvas 2D, no map tiles.

  • Seat Scale Pricing

    One pricing card that morphs through every plan as you drag the team size: avatars pop in seat by seat, the price rolls on odometer reels, the tier badge and accent cross-fade, unlocked features…

  • Now Playing Widget

    A vinyl slides out of a generated sleeve and spins as a tonearm settles on it, an EQ breathes beside the title and progress ticks live with a scrubbable seek bar. Visual only — wire it to your own…

See all 15 Widgets components