Brand Guide

Components

Shimmer

A utility class that moves a band of light across a line of text, to show that something is in progress.

How it works

Put shimmer on the element that holds the text. A band of light moves across the letters, from the start of the line to the end, and repeats every two seconds.

The band is made from the text's own colour, currentColor, so set the text colour as usual and the shimmer follows it, in light and dark. Only the letters are lit: there is no box or background behind them.

It respects prefers-reduced-motion by itself. With reduced motion on, the text is plain and still.

The utility comes from shadcn/tailwind.css, which each app imports in its globals.css.

Default

Dex is reading your CV…

While something is running

The class is on only while the work is under way.

Found 12 roles

Colour

The band takes the text colour unless it is given another.

Looking for roles in London…

Looking for roles in London…

Duration, spread and angle

shimmer-duration-1000

shimmer-spread-24

shimmer-angle-45

Once, and off

The first line shimmers once when the page loads. The second stops shimmering from the md breakpoint up.

shimmer shimmer-once

shimmer md:shimmer-none

Classes

Class What it does
shimmer Turns the shimmer on
shimmer-color-brand/60 Sets the colour of the band, with an opacity after the slash. The default is a lighter version of the text colour
shimmer-duration-1000 One pass, in milliseconds. The default is 2000
shimmer-spread-24 The width of the band, on the spacing scale or as a length
shimmer-angle-45 The slant of the band, in degrees. The default is 20
shimmer-once One pass, then the text is plain
shimmer-reverse Runs from the end of the line to the start
shimmer-none Turns it off, for example from a breakpoint: md:shimmer-none

Best practices

  • Shimmer is for a line of status text while something is happening. In the chat it is on the typing indicator and on the status line of a tool Dex is running.
  • Take the class off when the work is done, so a finished status is still.
  • Content that has not loaded yet has the skeleton, and a button that is working has its loading prop.