WelcomeScreen
Displays a setup entry screen with cycling greetings, branding, and actions.
Component behavior
WelcomeScreen displays a greeting, branding, descriptive text, and entry actions before setup. Greetings occupy a fixed-height area. Cycling starts after hydration and is disabled by prefers-reduced-motion.
- An initial screen before a setup wizard.
- Entry actions for account, workspace, or import setup.
- Kiosk or appliance idle screens.
Wizard: the user must answer form questions.
EmptyState: content is embedded within an existing page layout.
LoginPanel: the initial task is authentication.
Greeting changes use a crossfade with vertical motion. The incoming greeting begins fading after the first third of the transition; the outgoing greeting finishes by two thirds. Transition duration scales with the hold interval.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
greetings | ReactNode[] | DEFAULT_WELCOME_GREETINGS | Greetings displayed one at a time. |
greetingDurationMs | number | 2400 | Greeting display duration, in milliseconds. Values below 400 are clamped to 400. |
cycleGreetings | boolean | true | When false, displays the first greeting. Server rendering and reduced-motion mode also display the first greeting. |
brand | ReactNode | — | Logo mark above the greeting. |
productName | ReactNode | — | Product name below the greeting. |
description | ReactNode | — | Description below the product name. |
actions | ReactNode | — | Action content below the description. |
footer | ReactNode | — | Footer content at the bottom of the screen. |
background | "glow" | "grid" | "plain" | "none" | "glow" | Background style shared with Stage. |
fullHeight | boolean | — | Fills its parent instead of sizing to its content. |
onGreetingChange | (index: number) => void | — | Fires on every change of greeting, with its index. |
children | ReactNode | — | Rendered between the description and the actions. |
Examples
A first-run screen
cycleGreetings={false} keeps the first greeting visible. The server and reduced-motion mode also display the first greeting.
Custom greetings
DEFAULT_WELCOME_GREETINGS is exported and can be reordered, filtered, or replaced.
import { WelcomeScreen, DEFAULT_WELCOME_GREETINGS } from "@solarius/onset";
// Only the locales this build ships.
<WelcomeScreen greetings={["Welcome", "Bienvenue", "Willkommen"]} />
// Or the first eight of the bundled list, held a little longer.
<WelcomeScreen
greetings={DEFAULT_WELCOME_GREETINGS.slice(0, 8)}
greetingDurationMs={3200}
/>Server rendering
- The server and the first client render both show
greetings[0]. Cycling starts after hydration, through useHydrated — the same pattern Timestamp and RelativeTime use. - No clock, timezone or platform reads any part of the markup, so the server render is deterministic.
- Under
prefers-reduced-motionthe greeting neither cycles nor fades.
Import
import { WelcomeScreen, DEFAULT_WELCOME_GREETINGS } from "@solarius/onset";
import type { WelcomeScreenProps } from "@solarius/onset";
const [begun, setBegun] = useState(false);
return begun ? (
<Wizard steps={steps} onFinish={install} bordered={false} />
) : (
<WelcomeScreen
fullHeight
actions={
<Button variant="primary" onClick={() => setBegun(true)}>
Get started
</Button>
}
/>
);