Compass field
A field of compass needles. At rest they follow a calm, gently varied north; when the pointer comes in they swing round on springs to point at it, overshooting a little, and a click sends a ring outward that spins each needle as it passes.
When to use
- Backdrops for navigation, travel and onboarding ("find your bearings").
- Empty states that should invite the pointer in.
When not to use
- Behind dense content.
- Touch-first screens, where there is no hover to follow.
Installation
pnpm dlx shadcn@latest add @caliper/compass-field
Adds its 4 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.
API reference
CompassField
1 prop
Also accepts the native props of its root element and a ref.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-hidden in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/compass-field.mdThe index of every part is at /llms.txt.