Cabin

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-cabin

About this component

An aeroplane window set in a soft moulded cabin wall. Its ribbed shade starts most of the way up, its lip hanging into the glass so you can see it pulls down (it dips a little further when you point at it), on a sunset cloud sea drifting past at two depths, a metal wing flexing in the air with its strobe blinking, and warm light falling on the wall; press the window and the shade comes down to the sill, press again and it slides back up. Move the pointer and the view shifts behind the glass like a real window.

Triggers

  • Card
  • Click
  • Hover
  • State change
  • 3D
  • Ambient
  • Mouse tracking

Techniques

  • SVG
  • SVG filter
  • Keyframes
  • CSS transition
  • Gradient
  • Radial gradient
  • CSS variables
  • 3D transform
  • Mouse tracking

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The window is a native button whose label switches between 'Open the window shade' and 'Close the window shade'; the card is a section named Window seat and the picture inside is aria-hidden. Focus shows a 2px ring round the frame.

Reduced motion

The clouds hold still at their resting places, the wing, strobe and banking stop, the wisp is hidden and the shade moves without easing.

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

More cards

See all
CellGet code

Holding

ClimateGet code

48km/h

74%

ClusterGet code

DecalGet code