Splash

Splash Choice

Shapes become the logo, it rises, and each option you pick changes the shape and the sentence.

Preview

Installation

Terminal
npx @usefluid/cli add splash-choice

Usage

SplashChoice.tsx
import { shapes } from "@usefluid/motion";
import { SplashChoice } from "./SplashChoice";

const seen = typeof window !== "undefined" && sessionStorage.getItem("intro") === "1";

<SplashChoice
  logo={logo}
  as="h1"
  title="Made for"
  word="you."
  finished={seen}
  onDone={() => sessionStorage.setItem("intro", "1")}
  options={[
    { value: "shops", label: "Shops", word: "shops.", shape: shapes.square },
    { value: "apps", label: "Apps", word: "apps.", shape: shapes.capsule },
  ]}
/>

API reference

PropTypeDefaultDescription
logostring—Your logo path.
title, wordstring—The headline and its last word.
options{ value, label, word, shape }[]—Each option swaps the word and the shape.
value, onChange—Control the choice, or leave it alone.
as"h1" | "h2""h2"Use h1 when it is the page's main heading.
routestring[]—Shapes before the logo.
finishedbooleanfalseStart on the final screen, for later visits.
skippablebooleantrueAny key or tap jumps to the end.
onDone() => void—Called when the final screen is reached.
playbooleantrue

Keyboard and screen readers

The picker is a radio group and stays inert until it is visible. Reduced motion shows the final screen.

Notes

It fills the screen by default; set --fluid-splash-height to fit it in a box.

Every colour comes from the --fluid-* variables, and the piece is yours to change.

How it is made

The full opening. A timeline takes the contour through the shapes to the logo, and it rises to its place. Then each option in the picker sends the same contour to another shape and swaps the headline's word out of a blur. One body from start to end.

For your agent

For your agent

Add Splash Choice to my project with the Fluid library. Build my product's opening with SplashChoice, my logo and the areas of my business as options. Read my project first. Use my logo, my colours and my font through the --fluid-* variables. Keep 44px touch targets, visible focus and reduced motion. If I have no SVG logo, ask before making one up.