Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Questionnaire
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Sections
@shadcn/react
@shadcn/helpers
Utilities
支払いが完了しました
$29.99のお支払いが処理されました。領収書がメールアドレスに送信されました。
新機能を利用できます
ダークモードのサポートを追加しました。アカウント設定から有効にできます。
import { CheckCircle2Icon, InfoIcon } from "lucide-react"
import {インストール#
pnpm dlx shadcn@latest add alert
使用法#
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"<Alert>
<InfoIcon />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components and dependencies to your app using the cli.
</AlertDescription>
<AlertAction>
<Button variant="outline">Enable</Button>
</AlertAction>
</Alert>構成#
次の構成を使用して、Alert を構築します。
Alert
├── Icon
├── AlertTitle
├── AlertDescription
└── AlertAction基本#
アイコン、タイトル、説明を含む基本的なアラート。
アカウントを更新しました
プロフィール情報が保存されました。変更内容はすぐに反映されます。
import { CheckCircle2Icon } from "lucide-react"
import {破壊的#
variant="destructive" を使用して、破壊的なアラートを作成します。
支払いに失敗しました
お支払いを処理できませんでした。お支払い方法をご確認の上、もう一度お試しください。
import { AlertCircleIcon } from "lucide-react"
import {アクション#
AlertAction を使用して、ボタンまたはその他のアクション要素をアラートに追加します。
ダークモードを利用できます
プロフィール設定から有効にしてご利用いただけます。
import {
Alert,
AlertAction,カスタムカラー#
bg-amber-50 dark:bg-amber-950 などのカスタムクラスを Alert コンポーネントに追加することで、アラートの色をカスタマイズできます。
サブスクリプションの有効期限が3日後に切れます。
サービスの中断を避けるには今すぐ更新するか、有料プランにアップグレードして ご利用を継続してください。
import { AlertTriangleIcon } from "lucide-react"
import {RTL#
shadcn/ui で RTL サポートを有効にするには、RTL 構成ガイド を参照してください。
تم الدفع بنجاح
تمت معالجة دفعتك البالغة 29.99 دولارًا. تم إرسال إيصال إلى عنوان بريدك الإلكتروني.
ميزة جديدة متاحة
لقد أضفنا دعم الوضع الداكن. يمكنك تفعيله في إعدادات حسابك.
"use client"
import * as React from "react"API リファレンス#
アラート#
Alert コンポーネントは、ユーザーの注意を促すコールアウトを表示します。
| プロパティ | タイプ | デフォルト |
|---|---|---|
variant | "default" | "destructive" | "default" |
アラートタイトル#
AlertTitle コンポーネントは、アラートのタイトルを表示します。
| プロパティ | タイプ | デフォルト |
|---|---|---|
className | string | - |
アラートの説明#
AlertDescription コンポーネントは、アラートの説明または内容を表示します。
| プロパティ | タイプ | デフォルト |
|---|---|---|
className | string | - |
アラートアクション#
AlertAction コンポーネントは、アラートの右上隅に絶対配置されたアクション要素 (ボタンなど) を表示します。
| プロパティ | タイプ | デフォルト |
|---|---|---|
className | string | - |