Velocity X Components

Cards & Expandables

Expandable Card

Card that expands into a focused overlay on desktop and a draggable bottom sheet on mobile, with three snap points. Portal-rendered, focus-trapped, scroll-locked and reduced-motion aware.

Free MIT licensed. Install it with the CLI — no account, no key.
bash
$ velocityx add expandable-card

Built for react. Needs react, react-dom already installed as peer dependencies. An Astro-only project needs @astrojs/react wired up first — this won't run on its own in plain Astro.

Full docs for Expandable Card →

react v1.0.1 react react-dom

Expandable Card

Card that expands into a focused overlay on desktop and a draggable bottom sheet on mobile, with three snap points. Portal-rendered, focus-trapped, scroll-locked and reduced-motion aware.

Preview isn't available in this repo yet — install with the CLI to view the source

Props

This component's API isn't documented yet.

Files this creates

The CLI writes these paths into your project, relative to its root — nothing else moves.

text
components/velocity/expandable-card/ExpandableCard.jsx
components/velocity/expandable-card/useSheetDrag.js

Using the Expandable Card component

Install it with velocityx add expandable-card. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Cards & Expandables.