Zephora UI

Overlay

Alert

Inline banner for contextual feedback with four statuses and three visual variants. Uses role="alert" for warning/danger and role="status" otherwise.

Import

import { Alert } from "@zephora/react";

Examples

Statuses

Heads up
A new version is available.
Saved
Your profile has been updated.

Variants

soft (default), solid and outline.

Soft
Solid
Outline

Closable

`closable` renders a close button; you own the visibility state.

API

Alert props

PropTypeDefaultDescription
status"info" | "success" | "warning" | "danger""info"Semantic tone; also picks the built-in icon and ARIA role.
variant"soft" | "solid" | "outline""soft"Visual style.
titleReactNodeBold first line of the banner.
iconReactNodeCustom leading icon; pass null to hide the default status icon.
closablebooleanfalseRenders a close button.
onClose() => voidCalled when the close button is pressed.
unstyledbooleanfalseHeadless mode — skips Zephora styling.
childrenReactNodeDescription text under the title.