Skip to content
Astro Rocket
Get in touch

Product · · 2 min read

The Animations

What moves in Astro Rocket, 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 Rocket keeps its pages calm: the backgrounds stand still, and the lines between the sections are lit but don’t move. What moves is the content, once, as it comes into view.

What moves

Every animation uses one easing curve, cubic-bezier(0.16, 1, 0.3, 1): it starts fast and comes to rest without bouncing. The system is the one Astro Rocket 2.7 had, in src/components/fx/Motion.astro.

  • The hero. The badge, the heading, the line under it and the buttons slide up 80px one after another, 90ms apart. 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 projects. 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.
  • The row of tools under the homepage hero runs across the screen. It pauses while the mouse or keyboard focus is on it.
  • In a post, a thin bar along the top of the window fills as you read.

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 row of tools stands still, its words wrapped onto as many lines as they need. The page has the same content either way.

Switching it off

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

Related posts

Get started

Ready to build?

Clone Astro Rocket, pick a theme, and launch your next project in minutes.