Skip to content
caliper ui docs

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.

Pro
pnpm dlx shadcn@latest add @caliper/zip-reveal

Members offer

Pull the zip down.

Two nights, on us

Book a stay of five nights or more before the end of the month.

Installs components/ui/zip-reveal.tsxDepends on none beyond ReactMotion none in component source

When 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

terminal
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.

example.tsx
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
Checking your licence…

API reference

ZipReveal

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
coverReactNode—The face of the closed panel. Defaults to a plain surface.
progressnumber—How far open it is, from 0 to 1.
defaultProgressnumber0
onProgressChange((progress: number) => void)—
labelstring"Zip"Names the pull for assistive technology, e.g. "Open the offer".

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.

All Surfaces examples