Components

Alert

Displays contextual feedback messages for user actions. Supports multiple variants, color roles, and dismissible behavior.

import{ Alert }from"oks-ui"
3 variants7 color rolesDismissibleCustom iconTitle & description

Colors

Semantic colors to communicate intent.

Dismissible

Allow users to dismiss the alert via a close button.

Interactive Playground

Controls

Preview

Generated Code

<Button>Button</Button>

Props

title

ReactNode

The alert title.

description

ReactNode

Additional description text.

variant"solid"

"solid" | "soft" | "bordered"

Visual style variant.

color"default"

"default" | "primary" | "secondary" | "info" | "success" | "warning" | "danger"

Semantic color role.

isClosablefalse

boolean

Show a close button.

icon

ReactNode

Custom icon override.

hideIconfalse

boolean

Hide the icon.

hideIconWrapperfalse

boolean

Hide the icon wrapper.

size"md"

"xs" | "xs-sm" | "sm" | "md" | "lg" | "xl"

Alert size.

onClose

() => void

Called when the alert is closed.