Tiles

Activity

659 commits in 16 weeks

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-tiles

About this component

An activity card: sixteen weeks as a grid of small tiles in an indigo ramp with coral for the busiest days. Hover or press it and the grid tips into a skyline, every day rising into a column as tall as its count, and the header names the day under the pointer.

Triggers

  • Hover
  • Click
  • State change
  • 3D
  • Mouse tracking
  • Card
  • Delay stagger

Techniques

  • requestAnimationFrame
  • 3D transform
  • Event position
  • Stagger
  • Interval
  • State machine

Difficulty

Advanced

Accessibility

Keyboard and screen readers

The grid is a native <button> with aria-pressed and a label that gives the total ("… commits in the last 16 weeks. Show as a skyline"), with a :focus-visible ring; Enter or Space pins the skyline. Single days are a pointer extra, so the tiles are aria-hidden and the total is always in the text.

Reduced motion

There is no wave and the skyline appears and leaves at once.

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

More cards

See all
SavedYour changes are live.
Cut-inGet code
PillarGet code
AgendaGet code
ClimbGet code