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
- Message
- Message Scroller
- Native Select
- 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
import { Button } from "@/components/ui/aria/button"
import {
Dialog,インストール#
pnpm dlx shadcn@latest add dialog
使い方#
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"<DialogTrigger>
<Button>Open</Button>
<Dialog>
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</Dialog>
</DialogTrigger>構成#
次の構成を使用して Dialog を構築します。
DialogTrigger
├── Button
└── Dialog
├── DialogHeader
│ ├── DialogTitle
│ └── DialogDescription
└── DialogFooterカスタム閉じるボタン#
デフォルトの閉じるコントロールを独自のボタンに置き換えます。
import { Button } from "@/components/ui/aria/button"
import {
Dialog,閉じるボタンなし#
showCloseButton={false} を使用すると、閉じるボタンを非表示にできます。
import { Button } from "@/components/ui/aria/button"
import {
Dialog,スティッキー フッター#
コンテンツがスクロールしている間、アクションを表示したままにします。
import { Button } from "@/components/ui/aria/button"
import {
Dialog,スクロール可能なコンテンツ#
長いコンテンツはヘッダーを表示したままスクロールできます。
import { Button } from "@/components/ui/aria/button"
import {
Dialog,RTL#
shadcn/ui で RTL サポートを有効にするには、RTL 構成ガイドを参照してください。
"use client"
import {API リファレンス#
詳細については、React Aria のドキュメントを参照してください。
shadcn/uiアプリをVercelにデプロイ
OpenAI、Sonos、Adobeなどに採用されています。
Vercelは、アプリや機能を大規模にデプロイするためのツールと インフラを提供します。
Vercelにデプロイ