Aperture

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-aperture

About this component

A camera iris. Six overlapping blades swivel outward together to open a hexagon onto the lens glass, and swivel back to shut it. Pure CSS on a native switch: each blade is one rotated, translated plane.

Triggers

  • Click
  • State change
  • 3D

Techniques

  • Transform only
  • CSS variables
  • Gradient

Difficulty

Advanced

Accessibility

Keyboard and screen readers

Native checkbox with role="switch" inside a <label>. The visible label text names it. Focus ring on the visual via :focus-visible.

Reduced motion

The change is instant.

Use it in anything you build, commercial and client work included. Licence

More toggles

See all
BeamGet code
BlindsGet code
CandleGet code
Caps LockGet code