Skip to main content

  • Foundations
    • Border radius
    • Breakpoints
    • Colours
    • Colour scheme
    • Elevation
    • Focus and outline
    • Sizing and spacing
    • Layout
    • Motion
    • Typography
    • Z-index
  • Elements
    • Buttons
    • Code
    • Icons
    • Figure and caption
    • Forms
    • Links
    • Lists
    • Media
    • Tables
  • Components
    • Accordion
    • Alerts
    • Avatar
    • Blockquote
    • Breadcrumbs
    • Card
    • Chiplets
    • Details and summary
    • Dialog
    • Empty state
    • Stats
    • Global footer
    • Horizontal rule
    • Kanban
    • Key-value list
    • Meter
    • Objects
    • Pagination
    • Polka background
    • Post-it note
    • Progress
    • Speech bubbles
    • Status dot
    • Skeleton
    • Skip link
    • Spinner
    • Toggles
    • Tooltip
    • Webmentions
  • Patterns
    • Article header
    • Author card
    • App list and app sheet
    • Error page
    • Related posts
    • Search results
    • Utilities

John Peart

  • Search
  • Menu
John Peart

Motion

Transitions, scroll-driven animations and reduced-motion handling.

Transitions are short and functional. Easing defaults to ease. View Transitions are enabled between pages when the user hasn't opted out of motion.

Examples on this site:

  • Button hover: top: 3px shift, no timing (snap feedback).
  • Input focus: colour transition 0.3s.
  • Tooltip: opacity + transform 0.15s ease.
  • Dialog entrance: 0.2s ease-out.
  • Toast entrance: 0.25s ease-out.
  • Skeleton shimmer: 1.5s ease-in-out infinite.
transition: color 0.3s;
transition: opacity 0.15s ease, transform 0.15s ease;

Reduced motion

All animated components honour prefers-reduced-motion: reduce — page view transitions are disabled, skeleton shimmer stops, alert entrance is removed, and the spinner slows dramatically.

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .spinner  { animation-duration: 3s; }
}
A line drawing of John Peart

John Peart

www.johnpe.art

Mastodon logo

Mastodon

BlueSky logo

Bluesky

LinkedIn logo

LinkedIn

Github logo

GitHub