Afloat

FERRYNo. 2291

Oban → Craignure

Dep 14:00 · Pier 2£7.20
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-afloat

About this component

A ferry ticket card floating on the water, its lower edge under the surface: it bobs and rocks gently on its own, and pressing it pushes that side under, sending a ripple out across the water before it rights itself and bobs back up.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers4

  • Click
  • Spring
  • Ambient
  • Card

Techniques4

  • requestAnimationFrame
  • Spring
  • Event position
  • Keyframes

Accessibility

Keyboard and screen readers

The ticket is real text in an article labelled with the route; pressing is a pointer flourish only, so it needs no keyboard equivalent.

Reduced motion

The ticket floats still and a press only sends the ripple.

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

More cards

See all
Field camera 4×5£640

Walnut · bellows in good order

Ships in 2 days
BellowsGet code
The Long Room2026 · 1h 52
18:4021:1523:30
CinemaGet code
Cape Wrath

Lighthouse · Sutherland

DollyGet code
DrosteGet code