Skip to content
Astro Lumetric
Start free

Product · · 3 min read

The animations

What moves in Astro Lumetric, and how it stays calm for readers who ask for less motion.

On this page
  1. What moves
  2. Less motion
  3. Switching it off

Astro Lumetric keeps its pages calm: the backgrounds, the lime glows and the lines of the Grid design stand still. What moves is the content, once, as it comes into view. It’s the same in both designs.

What moves

The animations live in src/components/fx/Motion.astro. They share one easing curve, cubic-bezier(0.16, 1, 0.3, 1): it starts fast and comes to rest without bouncing.

  • The hero. Its parts slide up 80px one after another, 90ms apart: the pill, the heading, the line under it, the buttons, and what comes under them, such as the dashboard in the Stage design or the bar chart in Grid. The heading only rises and doesn’t fade, so the page’s largest text is there at once.
  • The header. It drops in from above, 150ms after the hero starts, when you arrive on the site. Moving between its pages, it stays where it is.
  • Sections. Every heading, block and link below the hero slides up 96px and fades in as it comes into view, once. What’s already on the first screen rises in just after the hero.
  • Cards. Each card comes in when it comes into view itself; cards that come in together, side by side, follow one another 100ms apart. A card moves as one piece.
  • Posts and customer stories. A post has no hero: its breadcrumbs, cover, date, title and description slide up one after another, as a hero’s parts do. Then paragraphs, headings, code and pictures rise 56px one by one as you read, once they’re a little way up the screen; a long list comes in item by item.
  • Jumps. A link to a section further down the page shows that section at once, instead of animating it mid-jump.

Besides these:

  • A soft light follows the mouse over cards.
  • In a post, a thin lime bar along the top of the window fills as you read, and the share bar slides in beside the text.
  • Moving from one page to the next, the browser cross-fades the old page into the new one.

Rows of tags stay still. To mark a part of your own, add data-reveal (or data-reveal="left", "right", "down", "scale") to it, or data-reveal-children to a row. data-no-reveal keeps a part still.

Less motion

When a reader’s device asks for reduced motion, everything appears without moving, and the light over the cards stays off. The page has the same content either way, and without JavaScript everything simply shows.

Switching it off

In src/config/theme.config.mjs, motion: false switches off the hero, header and scroll animations, and readingProgress: false removes the bar in posts.

Related posts

Get started

New to Astro Lumetric?

The first guide installs the theme, runs it on your computer and puts it online.