Bridge
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardBridge(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-bridgeAbout this component
Three matte black slabs, Design, Code and Ship, coupled on one rail with a pin light each; two stand open at a time and the third sits folded to a thin bar that shows only its pin. Press any slab: a folded one opens while the older open one folds away, and an open one folds while the folded one opens, so exactly two are always open. The red spark rides the coupling between the open pair; the slab opened last carries a white pin, the other open one green, the folded one red.
Triggers
- Card
- Click
- State change
- Spring
- Glow
Techniques
- CSS variables
- CSS transition
- clip-path
- Gradient
- Pseudo elements
- SVG filter
- Keyframes
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
A section labelled Design, code and ship. Each slab is a native button named by its title with aria-expanded true when open and false when folded; the spark is a button labelled Open <name>. Arrow keys move focus between the slabs and Enter or Space toggles the focused one; focus rings are 2px, offset 2px.
Reduced motion
The slabs jump to their new places and the star does not pulse.
Use it in anything you build, commercial and client work included. Licence