Skip to content
Menu

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.

ControlTypeDefaultPreview limits
shapeselectroundedSquareOptions: roundedSquare, disc, ring, triangle
lensSizenumber0.3From 0.1 to 0.8; step 0.05
lensSoftnessnumber0.5From 0 to 1; step 0.05
strokeWeightnumber2From 1 to 8; step 0.5
accentcolor#38BDF8No 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.

Connect your agent

Related open components