Pro
Zip reveal
A panel closed with a zip. Drag the pull down and the two halves part in a V behind it, showing what is underneath. Let go past halfway and it zips the rest of the way open; before halfway and it zips shut.
pnpm dlx shadcn@latest add @caliper/zip-revealWhen to use
Use it for
- Teasing an offer, a result or a before-and-after.
- A landing-page moment that earns a little play.
Skip it when
- Content people need at once.
- Anything inside a scrolling list; the pull captures vertical drags.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Snaps to the nearest end
- Letting go before halfway zips it shut and after halfway zips it open, so it never rests half undone.
Usage
- A vertical slider
- The pull is a slider: arrows move it by a tenth, Home and End go to the ends, and Enter toggles it.
- The content is always in the page
- What lies underneath stays available to assistive technology; the zip is a visual reveal.
Installation
pnpm dlx shadcn@latest add @caliper/zip-reveal
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { ZipReveal } from "@/components/ui/zip-reveal"
The worked example comes with Pro
The 28-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
ZipReveal
component
Also accepts the native props of its root element and a ref.
Accessibility
It exposes slider semantics, with aria-hidden, aria-orientation, aria-label, aria-valuemin, aria-valuemax and aria-valuenow kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Clip revealUncovers an image or section with a wipe as it scrolls into view, the content settling from a slight zoom behind the edge. From any side or as an iris from the middle, once or every time.
- Pixel revealSwaps content behind a wave of square tiles: they cover the old view corner to corner, the content changes while hidden, and the tiles clear the same way. Change the key to run it; the whole wave is about half a second.
- Blinds revealContent behind a row of slats that fold away one after another as the block scrolls into view, or when told to. Alternate slats fold to opposite edges, and the content underneath settles from a touch larger.
