Animation
Focus Lens
Focus Lens: An outlined shape that stays soft and out of focus everywhere except in a small circle that follows the pointer, where it snaps sharp.
Using Focus Lens
Focus Lens uses the card preview frame with a light/dark theme setting.
Customize the preview
These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.
| Control | Type | Default | Preview limits |
|---|---|---|---|
shape | select | roundedSquare | Options: roundedSquare, disc, ring, triangle |
lensSize | number | 0.3 | From 0.1 to 0.8; step 0.05 |
lensSoftness | number | 0.5 | From 0 to 1; step 0.05 |
strokeWeight | number | 2 | From 1 to 8; step 0.5 |
accent | color | #38BDF8 | No additional limit in the metadata. |
Which frameworks are available for Focus Lens?
Focus Lens is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.
What does Focus Lens depend on?
The React metadata lists no additional npm dependencies beyond React.
What accessibility details are visible in Focus Lens?
The React source for Focus Lens includes: attributes and handlers (aria-hidden). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.
How does Focus Lens handle reduced motion?
Focus Lens reads the motion preference in its React source through matchMedia(prefers-reduced-motion). Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.