- Home
- Primitives
- Toast
Toast
Temporary non-blocking notification.
Preview
This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.
Temporary non-blocking notification.
Usage
Compose Region, Root, Title, Description, Close.
import * as Toast from "@solidiom/toast"
;<Toast.Region>Toast content</Toast.Region>Installation
Install the package with pnpm add @solidiom/toast. The package requires compatible solid-js and @solidjs/web peer dependencies.
Parts
Toast exposes 5 parts:
- Region —
data-part="region". - Root —
data-part="root". - Title —
data-part="title". - Description —
data-part="description". - Close —
data-part="close".
Styling
Toast carries data-scope="toast" and data-part attributes on each part for CSS/recipe targeting. State attributes like data-state, data-disabled, and data-highlighted are exposed where applicable.
Keyboard & behavior
This primitive has no keyboard interaction. It renders content that does not independently receive focus or respond to key events.
Composition
Toast is designed to compose with other primitives. Its parts can be combined with Field, Button, or other primitives as needed.
SSR and hydration
Toast renders as semantic HTML during server rendering. Interactive behavior (keyboard handlers, state management) activates on hydration without layout shift.