Resources

Intros

Everything that plays when a page loads, not as it scrolls into view: loaders, the full-screen covers that show while the page arrives, and heroes with a load animation. Press play under a frame to see it again.

[ Loader Bar - Intro ] Loader

A thin line that grows across the middle of the screen as the page loads, then fades. Progress is real on a site (the fonts and the pictures at the top of the page); the frame fakes a load. Mount it once in a layout, ahead of the page, and heroes with a load animation wait for it.

Available props:

  • minDuration A number of milliseconds, the fastest the count can run, so a quick connection still plays the animation through. Defaults to 900.
  • maxDuration A number of milliseconds after which it finishes even if the page is still loading. Defaults to 8000.
  • track A function (update) => stop that calls update(progress) with a number from 0 to 1 and returns a function that stops it. Defaults to watching the page's fonts and the pictures at the top of it; pass your own to wait on something else, such as a video.
  • contained A boolean. Keeps the loader inside its parent and leaves the page alone (no scroll lock, and loading.done is untouched). For previews; leave it off on a site.
  • onfinish A function that runs when the loader has gone.
  • class A string of extra classes, e.g. a theme-* surface.
Loading

[ Loader Counter - Intro ] Loader

A very large percentage in the bottom left that counts up to 100, then the whole screen slides away upward. Progress is real on a site (the fonts and the pictures at the top of the page); the frame fakes a load. Mount it once in a layout, ahead of the page, and heroes with a load animation wait for it.

Available props:

  • minDuration A number of milliseconds, the fastest the count can run, so a quick connection still plays the animation through. Defaults to 900.
  • maxDuration A number of milliseconds after which it finishes even if the page is still loading. Defaults to 8000.
  • track A function (update) => stop that calls update(progress) with a number from 0 to 1 and returns a function that stops it. Defaults to watching the page's fonts and the pictures at the top of it; pass your own to wait on something else, such as a video.
  • contained A boolean. Keeps the loader inside its parent and leaves the page alone (no scroll lock, and loading.done is untouched). For previews; leave it off on a site.
  • onfinish A function that runs when the loader has gone.
  • class A string of extra classes, e.g. a theme-* surface.
Loading

[ Loader Curtain - Intro ] Loader

A percentage in the middle of two panels that part, up and down, when it reaches 100. Progress is real on a site (the fonts and the pictures at the top of the page); the frame fakes a load. Mount it once in a layout, ahead of the page, and heroes with a load animation wait for it.

Available props:

  • minDuration A number of milliseconds, the fastest the count can run, so a quick connection still plays the animation through. Defaults to 900.
  • maxDuration A number of milliseconds after which it finishes even if the page is still loading. Defaults to 8000.
  • track A function (update) => stop that calls update(progress) with a number from 0 to 1 and returns a function that stops it. Defaults to watching the page's fonts and the pictures at the top of it; pass your own to wait on something else, such as a video.
  • contained A boolean. Keeps the loader inside its parent and leaves the page alone (no scroll lock, and loading.done is untouched). For previews; leave it off on a site.
  • onfinish A function that runs when the loader has gone.
  • class A string of extra classes, e.g. a theme-* surface.
Loading

[ Loader Grid - Intro ] Loader

A very large percentage in the bottom right that counts up to 100, over a screen of surface-colored tiles, the same grid as the Tiles page transition. When it reaches 100 the tiles fade away in a scattered wave from the top left, uncovering the page. Progress is real on a site (the fonts and the pictures at the top of the page); the frame fakes a load. Mount it once in a layout, ahead of the page, and heroes with a load animation wait for it.

Available props:

  • minDuration A number of milliseconds, the fastest the count can run, so a quick connection still plays the animation through. Defaults to 900.
  • maxDuration A number of milliseconds after which it finishes even if the page is still loading. Defaults to 8000.
  • track A function (update) => stop that calls update(progress) with a number from 0 to 1 and returns a function that stops it. Defaults to watching the page's fonts and the pictures at the top of it; pass your own to wait on something else, such as a video.
  • contained A boolean. Keeps the loader inside its parent and leaves the page alone (no scroll lock, and loading.done is untouched). For previews; leave it off on a site.
  • onfinish A function that runs when the loader has gone.
  • class A string of extra classes, e.g. a theme-* surface.
Loading

[ Loader Logo - Intro ] Loader

The logo, faint at first, fills in from left to right as the page loads, then fades. Progress is real on a site (the fonts and the pictures at the top of the page); the frame fakes a load. Mount it once in a layout, ahead of the page, and heroes with a load animation wait for it.

Available props:

  • logo An object of Logo props, the logo that fills in. Required.
  • minDuration A number of milliseconds, the fastest the count can run, so a quick connection still plays the animation through. Defaults to 900.
  • maxDuration A number of milliseconds after which it finishes even if the page is still loading. Defaults to 8000.
  • track A function (update) => stop that calls update(progress) with a number from 0 to 1 and returns a function that stops it. Defaults to watching the page's fonts and the pictures at the top of it; pass your own to wait on something else, such as a video.
  • contained A boolean. Keeps the loader inside its parent and leaves the page alone (no scroll lock, and loading.done is untouched). For previews; leave it off on a site.
  • onfinish A function that runs when the loader has gone.
  • class A string of extra classes, e.g. a theme-* surface.

[ Hero Load Slide - Intro ] Hero

A very large three-word heading. When the hero comes into view the words reveal letter by letter with textReveal(), then the second and third lines slide left to line up with the first. Off with reduced motion (the words just show, already lined up).

Available props:

  • ...SectionCopy props Takes eyebrowText, eyebrowIcon, description, cta and the rest of Section Copy (see the Style Guide). The eyebrow (if set) sits above the words; the description and buttons sit to the right of the first word, and under it below md. From md up the second and third rows start indented 96px and 192px and slide left to line up with the first once they have revealed. title is not used; the heading comes from words.
  • words An array of exactly three strings, top to bottom. Together they make the page heading. Required.
  • size A string, any CSS length for the font size of the words. Defaults to clamp(72px, 15vw, 180px).
  • fullScreen A boolean. At least the height of the screen. Taller content still grows past it. Defaults to true.
  • static A boolean. Skips the reveal and the slide, for the CMS preview. Defaults to false.
  • class A string of extra classes, such as full on a Library page.

Make something great

Three lines that slide into line.

[ Hero Load Marquee Slide - Intro ] Hero

A very large three-word heading. When the hero comes into view the words reveal letter by letter with textReveal(), then the middle line slides across the page as a Marquee of words, the rest of which fade in as it starts. Off with reduced motion (the words just show, and the middle line stays put).

Available props:

  • ...SectionCopy props Takes eyebrowText, eyebrowIcon, description, cta and the rest of Section Copy (see the Style Guide). The eyebrow (if set) sits above the words; the description and buttons sit in the bottom left of the section, under the heading on small screens. From md up the second and third rows are indented 96px and 192px. title is not used; the heading comes from words.
  • words A tuple of three: a string, an array of strings, a string, top to bottom, e.g. ['A better way to', ['live', 'think', 'feel'], 'starts here']. The array is the marquee: its first word is revealed in place, then it starts looping and the rest fade in. Together they make the page heading. Required.
  • size A string, any CSS length for the font size of the words. Defaults to clamp(72px, 15vw, 180px).
  • divider A string, the mark between the looping words (and after the last, before it starts over), so the line does not read as a sentence. It is muted and fades in with the words. Any text works, e.g. '·', '/' or '✦'; an empty string shows none. Defaults to '·'.
  • speed A number, pixels per second the middle line slides once its first word has revealed. Defaults to 120.
  • fullScreen A boolean. At least the height of the screen. Taller content still grows past it. Defaults to true.
  • static A boolean. Skips the reveal and the slide, for the CMS preview. Defaults to false.
  • class A string of extra classes, such as full on a Library page.

Your story, journey, future, healing, growth starts here

Compassionate, evidence-based care for adults and families, at your own pace.

[ Hero Load Spread - Intro ] Hero

Three words reveal letter by letter with textReveal() in one centered line. The first then slides to the far left and the last to the far right, and the first rises to the top left corner while the last drops to the bottom right. The middle word never moves; the description and buttons fade in at the bottom left. It waits for the loader, so it pairs with any loader. Off with reduced motion (the final layout just shows). Pairs with the Links header.

Available props:

  • description A string, the line at the bottom left. It and the buttons fade in once the words have landed.
  • cta An object with a primary button and an optional secondary one, like Section Copy.
  • words An array of exactly three strings, left to right. Together they make the page heading. The middle word never moves; the first goes to the top left and the last to the bottom right. Required.
  • size A string, any CSS length for the font size of the words. Defaults to clamp(40px, 10vw, 180px).
  • fullScreen A boolean. At least the height of the screen. Taller content still grows past it. Defaults to true.
  • static A boolean. Skips the reveal and the movement and shows the final layout, for the CMS preview. Defaults to false.
  • class A string of extra classes, such as full on a Library page.

Build something lasting

Three words that spread to the corners.