Alert
Installation
npx shadcn@latest add https://ui.timkit.cn/r/alert.json
Usage
import { Alert } from "@/components/ui/alert"
Examples
Alert · Warning variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Success variant
Loading preview...
Alert · Success variant
Loading preview...
Alert · Info variant
Loading preview...
Alert · Info variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Destructive variant
Loading preview...
Structured API
Component
alert
Logic
none
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
WebWeChat Mini Program
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | none | State and interaction provider used by this component. |
| logic.machine | string | - | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web, WeChat Mini Program | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @timui/core | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | - | Optional peer dependencies used by this registry item. |
| registryDependencies | array | - | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | enum (default | destructive) | default | The visual style of the alert. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | The alert content |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The alert container |
| title | part | - | The alert title |
| description | part | - | The alert description |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page
Alert
Installation
npx shadcn@latest add https://ui.timkit.cn/r/alert.json
Usage
import { Alert } from "@/components/ui/alert"
Examples
Alert · Warning variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Success variant
Loading preview...
Alert · Success variant
Loading preview...
Alert · Info variant
Loading preview...
Alert · Info variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Warning variant
Loading preview...
Alert · Destructive variant
Loading preview...
Alert · Destructive variant
Loading preview...
Structured API
Component
alert
Logic
none
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
WebWeChat Mini Program
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | none | State and interaction provider used by this component. |
| logic.machine | string | - | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web, WeChat Mini Program | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @timui/core | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | - | Optional peer dependencies used by this registry item. |
| registryDependencies | array | - | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | enum (default | destructive) | default | The visual style of the alert. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | The alert content |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The alert container |
| title | part | - | The alert title |
| description | part | - | The alert description |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page