Components

Live specimens and usage examples for every component.

Button

<Button>Default</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="destructive">Destructive</Button>
<Button size="sm">Small</Button>
<Button disabled>Disabled</Button>

Input

<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="you@company.com" />

Label

<Label htmlFor="name">Full name</Label>

Card

Payment method

Manage your saved cards and billing address.

VISA
Visa ending in 4242
<Card>
  <CardHeader>
    <CardTitle>Payment method</CardTitle>
    <CardDescription>Manage your saved cards.</CardDescription>
  </CardHeader>
  <CardContent>
    <p>Visa ending in 4242</p>
  </CardContent>
  <CardFooter>
    <Button>Update</Button>
  </CardFooter>
</Card>

Badge

Default
Secondary
Outline
Success
Warning
Destructive
<Badge>Default</Badge>
<Badge variant="secondary">Secondary</Badge>
<Badge variant="outline">Outline</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="destructive">Destructive</Badge>

Separator

Section above
Section below
<Separator />

Select

<Select>
  <option value="">Choose a country</option>
  <option value="no">Norway</option>
  <option value="se">Sweden</option>
</Select>

Textarea

<Textarea placeholder="Describe the issue..." />

Checkbox

<div className="flex items-center gap-2">
  <Checkbox id="terms" />
  <Label htmlFor="terms">I agree to the terms</Label>
</div>

Switch

<Switch checked={enabled} onCheckedChange={setEnabled} />

Dialog

Confirm payment

Are you sure you want to process this transaction?

<Dialog open={open} onOpenChange={setOpen}>
  <DialogTrigger asChild>
    <Button>Open dialog</Button>
  </DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Confirm</DialogTitle>
      <DialogDescription>Are you sure?</DialogDescription>
    </DialogHeader>
    <DialogFooter className="gap-2">
      <Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
      <Button onClick={() => setOpen(false)}>Confirm</Button>
    </DialogFooter>
  </DialogContent>
</Dialog>

Tabs

Update your profile and contact details.

<Tabs defaultValue="account">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="security">Security</TabsTrigger>
  </TabsList>
  <TabsContent value="account">Account settings</TabsContent>
  <TabsContent value="security">Security settings</TabsContent>
</Tabs>

Table

InvoiceCustomerStatusAmount
#INV-001Nordic Health
Paid
€12,400.00
#INV-002Retail Plus
Pending
€8,250.00
#INV-003FinServe
Failed
€3,100.00
<Table>
  <TableHeader>
    <TableRow>
      <TableHead>Invoice</TableHead>
      <TableHead>Status</TableHead>
      <TableHead>Amount</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell>#001</TableCell>
      <TableCell>Paid</TableCell>
      <TableCell>$250.00</TableCell>
    </TableRow>
  </TableBody>
</Table>

Toast

<Toaster toasts={toasts} onClose={removeToast} />
<Toast onClose={close}>Message</Toast>

Skeleton

<Skeleton className="h-4 w-32" />
<Skeleton className="h-12 w-full rounded-md" />