label-01
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
export function LabelDemo() {
return (
<div className="flex gap-2">
<Checkbox id="terms" />
<Label htmlFor="terms">Accept Designali terms and conditions</Label>
</div>
)
}label-02
Loading...
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldLegend,
FieldSeparator,
FieldSet,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import { Textarea } from "@/components/ui/textarea"
const months = [
{ label: "MM", value: null },
{ label: "01", value: "01" },
{ label: "02", value: "02" },
{ label: "03", value: "03" },
{ label: "04", value: "04" },
{ label: "05", value: "05" },
{ label: "06", value: "06" },
{ label: "07", value: "07" },
{ label: "08", value: "08" },
{ label: "09", value: "09" },
{ label: "10", value: "10" },
{ label: "11", value: "11" },
{ label: "12", value: "12" },
]
const years = [
{ label: "YYYY", value: null },
{ label: "2024", value: "2024" },
{ label: "2025", value: "2025" },
{ label: "2026", value: "2026" },
{ label: "2027", value: "2027" },
{ label: "2028", value: "2028" },
{ label: "2029", value: "2029" },
]
export function FieldDemo() {
return (
<div className="w-full max-w-md">
<form>
<FieldGroup>
<FieldSet>
<FieldLegend>Payment Method</FieldLegend>
<FieldDescription>
All transactions are secure and encrypted
</FieldDescription>
<FieldGroup>
<Field>
<FieldLabel htmlFor="checkout-7j9-card-name-43j">
Name on Card
</FieldLabel>
<Input
id="checkout-7j9-card-name-43j"
placeholder="Ali Imam"
required
/>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-card-number-uw1">
Card Number
</FieldLabel>
<Input
id="checkout-7j9-card-number-uw1"
placeholder="1234 5678 9012 3456"
required
/>
<FieldDescription>
Enter your 16-digit card number
</FieldDescription>
</Field>
<div className="grid grid-cols-3 gap-4">
<Field>
<FieldLabel htmlFor="checkout-exp-month-ts6">
Month
</FieldLabel>
<Select items={months}>
<SelectTrigger id="checkout-exp-month-ts6">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{months.map((item) => (
<SelectItem key={item.value} value={item.value}>
{item.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-exp-year-f59">
Year
</FieldLabel>
<Select items={years}>
<SelectTrigger id="checkout-7j9-exp-year-f59">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{years.map((item) => (
<SelectItem key={item.value} value={item.value}>
{item.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</Field>
<Field>
<FieldLabel htmlFor="checkout-7j9-cvv">CVV</FieldLabel>
<Input id="checkout-7j9-cvv" placeholder="123" required />
</Field>
</div>
</FieldGroup>
</FieldSet>
<FieldSeparator />
<FieldSet>
<FieldLegend>Billing Address</FieldLegend>
<FieldDescription>
The billing address associated with your payment method
</FieldDescription>
<FieldGroup>
<Field orientation="horizontal">
<Checkbox
id="checkout-7j9-same-as-shipping-wgm"
defaultChecked
/>
<FieldLabel
htmlFor="checkout-7j9-same-as-shipping-wgm"
className="font-normal"
>
Same as shipping address
</FieldLabel>
</Field>
</FieldGroup>
</FieldSet>
<FieldSet>
<FieldGroup>
<Field>
<FieldLabel htmlFor="checkout-7j9-optional-comments">
Comments
</FieldLabel>
<Textarea
id="checkout-7j9-optional-comments"
placeholder="Add any additional comments"
className="resize-none"
/>
</Field>
</FieldGroup>
</FieldSet>
<Field orientation="horizontal">
<Button type="submit">Submit</Button>
<Button variant="outline" type="button">
Cancel
</Button>
</Field>
</FieldGroup>
</form>
</div>
)
}label-03
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function RequiredFieldLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="work-email">
Work email
<span className="text-destructive" aria-hidden="true">
*
</span>
</Label>
<Input
id="work-email"
type="email"
placeholder="you@designali.com"
required
/>
</div>
)
}
label-04
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function OptionalHintLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="company">
Company
<span className="font-normal text-muted-foreground">(optional)</span>
</Label>
<Input id="company" placeholder="Designali" />
</div>
)
}
label-05
Loading...
import {
Info as InfoIcon,
} from "@designali/icons"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip"
export function LabelWithTooltipInfo() {
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center gap-1">
<Label htmlFor="tax-id">Tax ID</Label>
<Tooltip>
<TooltipTrigger
render={
<Button
variant="ghost"
size="icon-xs"
aria-label="About tax ID"
/>
}
>
<InfoIcon />
</TooltipTrigger>
<TooltipContent>
Shown on invoices sent to your customers.
</TooltipContent>
</Tooltip>
</div>
<Input id="tax-id" placeholder="EU 123 456 789" />
</div>
)
}
label-06
Loading...
import {
Globe as GlobeIcon,
Mail as MailIcon,
Phone as PhoneIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
const fields = [
{
id: "contact-email",
label: "Email",
icon: MailIcon,
placeholder: "hello@designali.com",
},
{
id: "contact-phone",
label: "Phone",
icon: PhoneIcon,
placeholder: "(555) 019-3381",
},
{
id: "contact-site",
label: "Website",
icon: GlobeIcon,
placeholder: "designali.com",
},
]
export function LabelWithLeadingIcon() {
return (
<div className="flex w-full max-w-sm flex-col gap-4">
{fields.map((field) => (
<div key={field.id} className="grid gap-2">
<Label htmlFor={field.id}>
<field.icon className="size-3.5 text-muted-foreground" />
{field.label}
</Label>
<Input id={field.id} placeholder={field.placeholder} />
</div>
))}
</div>
)
}
label-07
Loading...
"use client"
import * as React from "react"
import { Label } from "@/components/ui/label"
import { Textarea } from "@/components/ui/textarea"
import { cn } from "@/lib/utils"
export function LabelWithCharacterCount() {
const [bio, setBio] = React.useState(
"Ali Imam - design engineer at Designali. Design se code tak."
)
const max = 160
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="bio">Bio</Label>
<span
className={cn(
"text-xs text-muted-foreground tabular-nums",
bio.length > max && "text-destructive"
)}
>
{bio.length}/{max}
</span>
</div>
<Textarea
id="bio"
value={bio}
onChange={(e) => setBio(e.target.value)}
className="min-h-20"
/>
</div>
)
}
label-08
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function LabelWithForgotLink() {
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="login-password">Password</Label>
<a
href="#"
className="text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline"
>
Forgot password?
</a>
</div>
<Input id="login-password" type="password" defaultValue="designali-2-code" />
</div>
)
}
label-09
Loading...
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
export function SwitchSettingRow() {
return (
<div className="flex w-full max-w-md items-center justify-between gap-6 border p-4">
<div className="grid gap-1.5">
<Label htmlFor="weekly-digest" className="text-sm font-medium">
Weekly digest
</Label>
<p id="weekly-digest-desc" className="text-xs text-muted-foreground">
A Monday summary of new Designali templates, blocks and comments.
</p>
</div>
<Switch
id="weekly-digest"
defaultChecked
aria-describedby="weekly-digest-desc"
/>
</div>
)
}
label-10
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
const options = [
{ id: "n-mentions", label: "New blocks and templates", checked: true },
{ id: "n-assign", label: "Comments on my Designali projects", checked: true },
{
id: "n-status",
label: "Icon and logo library updates",
checked: false,
},
{ id: "n-billing", label: "Billing from billing@designali.com", checked: false },
]
export function NotificationCheckboxList() {
return (
<fieldset className="flex w-full max-w-sm flex-col gap-3">
<legend className="mb-2 text-sm font-medium">Email me about Designali</legend>
{options.map((option) => (
<div key={option.id} className="flex items-center gap-2">
<Checkbox id={option.id} defaultChecked={option.checked} />
<Label htmlFor={option.id}>{option.label}</Label>
</div>
))}
</fieldset>
)
}
label-11
Loading...
import { Label } from "@/components/ui/label"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
const plans = [
{
value: "starter",
name: "Designali Free",
price: "$0",
detail: "Free blocks and 4000+ icons",
},
{
value: "team",
name: "Designali Pro",
price: "$24",
detail: "All 460+ blocks and templates",
},
{
value: "scale",
name: "Designali Studio",
price: "$79",
detail: "Pro plus custom design by Ali Imam",
},
]
export function PlanCardRadioLabels() {
return (
<RadioGroup defaultValue="team" className="w-full max-w-sm gap-2">
{plans.map((plan) => (
<Label
key={plan.value}
htmlFor={"plan-" + plan.value}
className="items-start gap-3 border p-3 has-data-checked:border-primary has-data-checked:bg-primary/5"
>
<RadioGroupItem
id={"plan-" + plan.value}
value={plan.value}
className="mt-0.5"
/>
<div className="flex flex-1 flex-col gap-1">
<span className="text-sm font-medium">{plan.name}</span>
<span className="text-muted-foreground">{plan.detail}</span>
</div>
<span className="text-sm font-semibold">
{plan.price}
<span className="text-xs font-normal text-muted-foreground">
/mo
</span>
</span>
</Label>
))}
</RadioGroup>
)
}
label-12
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
export function PeerDisabledLabel() {
return (
<div className="flex flex-col gap-3">
<div className="flex items-center gap-2">
<Checkbox id="export-csv" defaultChecked />
<Label htmlFor="export-csv">Export Designali blocks as TSX</Label>
</div>
<div className="flex items-center gap-2">
<Checkbox id="export-pdf" disabled />
<Label htmlFor="export-pdf">Export as Figma file (Designali Pro)</Label>
</div>
<div className="flex items-center gap-2">
<Checkbox id="export-xlsx" disabled defaultChecked />
<Label htmlFor="export-xlsx">Export as Framer (Designali Pro)</Label>
</div>
</div>
)
}
label-13
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function GroupDisabledLabel() {
return (
<div className="flex w-full max-w-sm flex-col gap-4">
<div className="group grid gap-2" data-disabled="true">
<Label htmlFor="sso-domain">SSO domain</Label>
<Input id="sso-domain" placeholder="designali.com" disabled />
<p className="text-xs text-muted-foreground">
Available on the Enterprise plan.
</p>
</div>
<div className="group grid gap-2" data-disabled="false">
<Label htmlFor="team-name">Team name</Label>
<Input id="team-name" defaultValue="Designali Studio" />
</div>
</div>
)
}
label-14
Loading...
import {
CircleAlert as CircleAlertIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function InvalidFieldLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="username" className="text-destructive">
Username
</Label>
<Input
id="username"
defaultValue="admin"
aria-invalid
aria-describedby="username-error"
/>
<p
id="username-error"
className="flex items-center gap-1 text-xs text-destructive"
>
<CircleAlertIcon className="size-3.5" />
That username is reserved. Try another.
</p>
</div>
)
}
label-15
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
const rows = [
{ id: "h-name", label: "Full name", value: "Ali Imam" },
{ id: "h-role", label: "Job title", value: "Founder, Design Engineer" },
{ id: "h-loc", label: "Location", value: "Lisbon, Portugal" },
]
export function HorizontalFormLabels() {
return (
<div className="flex w-full max-w-md flex-col gap-3">
{rows.map((row) => (
<div
key={row.id}
className="grid gap-2 sm:grid-cols-[7rem_1fr] sm:items-center"
>
<Label
htmlFor={row.id}
className="text-muted-foreground sm:justify-end"
>
{row.label}
</Label>
<Input id={row.id} defaultValue={row.value} />
</div>
))}
</div>
)
}
label-16
Loading...
import {
Sparkles as SparklesIcon,
} from "@designali/icons"
import { Badge } from "@/components/ui/badge"
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
export function LabelWithBetaBadge() {
return (
<div className="flex w-full max-w-sm items-center justify-between gap-4 border p-3">
<Label htmlFor="ai-summaries">
<SparklesIcon className="size-3.5" />
AI meeting summaries
<Badge variant="secondary">Beta</Badge>
</Label>
<Switch id="ai-summaries" />
</div>
)
}
label-17
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Kbd, KbdGroup } from "@/components/ui/kbd"
import { Label } from "@/components/ui/label"
const shortcuts = [
{ id: "sc-search", label: "Search designali.com", keys: ["⌘", "K"] },
{ id: "sc-new", label: "New Designali project", keys: ["⌘", "N"] },
{ id: "sc-side", label: "Toggle sidebar", keys: ["⌘", "B"] },
]
export function ShortcutSettingLabels() {
return (
<div className="flex w-full max-w-sm flex-col divide-y border">
{shortcuts.map((shortcut) => (
<div
key={shortcut.id}
className="flex items-center justify-between gap-3 p-3"
>
<div className="flex items-center gap-2">
<Checkbox id={shortcut.id} defaultChecked />
<Label htmlFor={shortcut.id}>{shortcut.label}</Label>
</div>
<KbdGroup>
{shortcut.keys.map((key) => (
<Kbd key={key}>{key}</Kbd>
))}
</KbdGroup>
</div>
))}
</div>
)
}
label-18
Loading...
import {
CloudUpload as UploadCloudIcon,
} from "@designali/icons"
import { Label } from "@/components/ui/label"
export function FileDropzoneLabel() {
return (
<Label
htmlFor="invoice-upload"
className="flex w-full max-w-sm cursor-pointer flex-col gap-2 border border-dashed p-6 text-center transition-colors hover:bg-muted/50"
>
<UploadCloudIcon className="size-6 text-muted-foreground" />
<span className="text-sm font-medium">Upload invoices</span>
<span className="text-muted-foreground">
PDF or PNG, up to 10 MB each
</span>
<input id="invoice-upload" type="file" multiple className="sr-only" />
</Label>
)
}
label-19
Loading...
import { Label } from "@/components/ui/label"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
import { cn } from "@/lib/utils"
const colors = [
{ value: "designali-blue", className: "bg-primary" },
{ value: "chart-2", className: "bg-chart-2" },
{ value: "chart-3", className: "bg-chart-3" },
{ value: "chart-4", className: "bg-chart-4" },
{ value: "muted", className: "bg-muted-foreground" },
]
export function ColorSwatchLabels() {
return (
<div className="flex flex-col gap-3">
<span className="text-xs font-medium">Designali theme accent</span>
<RadioGroup defaultValue="designali-blue" className="flex gap-2">
{colors.map((color) => (
<Label
key={color.value}
htmlFor={"color-" + color.value}
className="cursor-pointer p-0.5 ring-offset-2 ring-offset-background has-data-checked:ring-2 has-data-checked:ring-foreground"
>
<RadioGroupItem
id={"color-" + color.value}
value={color.value}
className="sr-only"
/>
<span className={cn("block size-7", color.className)} />
<span className="sr-only">{color.value}</span>
</Label>
))}
</RadioGroup>
</div>
)
}
label-20
Loading...
"use client"
import * as React from "react"
import {
Volume2 as Volume2Icon,
} from "@designali/icons"
import { Label } from "@/components/ui/label"
import { Slider } from "@/components/ui/slider"
export function SliderValueLabel() {
const [value, setValue] = React.useState(64)
return (
<div className="grid w-full max-w-sm gap-3">
<div className="flex items-center justify-between">
<Label htmlFor="volume">
<Volume2Icon className="size-3.5" />
Notification volume
</Label>
<span className="text-xs text-muted-foreground tabular-nums">
{value}%
</span>
</div>
<Slider
id="volume"
value={value}
onValueChange={(v) => setValue(Array.isArray(v) ? v[0]! : v)}
max={100}
/>
</div>
)
}
label-21
Loading...
import {
Camera as CameraIcon,
} from "@designali/icons"
import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/components/ui/avatar"
import { Label } from "@/components/ui/label"
export function AvatarUploadLabel() {
return (
<div className="flex items-center gap-4">
<Label htmlFor="avatar-file" className="group relative cursor-pointer">
<Avatar size="lg" className="size-16">
<AvatarImage src="/ali.jpg" alt="Ali Imam" />
<AvatarFallback className="bg-gradient-to-br from-primary to-primary text-lg text-white">
AI
</AvatarFallback>
</Avatar>
<span className="absolute inset-0 flex items-center justify-center rounded-full bg-black/50 text-white opacity-0 transition-opacity group-hover:opacity-100">
<CameraIcon className="size-5" />
</span>
<input
id="avatar-file"
type="file"
accept="image/*"
className="sr-only"
/>
</Label>
<div className="grid gap-1">
<span className="text-sm font-medium">Rafael Kim</span>
<span className="text-xs text-muted-foreground">
Click the photo to change it
</span>
</div>
</div>
)
}
label-22
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
export function TermsConsentLabel() {
return (
<div className="flex w-full max-w-sm items-start gap-2">
<Checkbox id="consent" className="mt-0.5" />
<Label htmlFor="consent" className="block leading-relaxed">
I agree to the{" "}
<a href="/docs/legal/terms" className="underline underline-offset-4">
Designali Terms of Service
</a>{" "}
and{" "}
<a href="#" className="underline underline-offset-4">
Privacy Policy
</a>
, and I'm at least 16 years old.
</Label>
</div>
)
}
label-23
Loading...
import { Label } from "@/components/ui/label"
export function FloatingLabelInput() {
return (
<div className="relative w-full max-w-sm">
<input
id="floating-email"
type="email"
placeholder=" "
className="peer h-12 w-full border border-input bg-transparent px-3 pt-4 text-sm outline-none focus:border-ring focus:ring-1 focus:ring-ring/50 dark:bg-input/30"
/>
<Label
htmlFor="floating-email"
className="pointer-events-none absolute start-3 top-1.5 text-[11px] text-muted-foreground transition-all peer-placeholder-shown:top-4 peer-placeholder-shown:text-xs peer-focus:top-1.5 peer-focus:text-[11px]"
>
Your designali.com email
</Label>
</div>
)
}
label-24
Loading...
import { Label } from "@/components/ui/label"
export function InsetLabelInput() {
return (
<div className="flex w-full max-w-sm flex-col border border-input px-3 py-2 focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 dark:bg-input/30">
<Label htmlFor="inset-card" className="text-[11px] text-muted-foreground">
Name on card
</Label>
<input
id="inset-card"
defaultValue="Ali Imam"
className="mt-1 bg-transparent text-sm outline-none"
/>
</div>
)
}
label-25
Loading...
import {
CircleCheck as CircleCheckIcon,
} from "@designali/icons"
import {
InputGroup,
InputGroupAddon,
InputGroupInput,
InputGroupText,
} from "@/components/ui/input-group"
import { Label } from "@/components/ui/label"
export function UrlFieldLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="store-url">Store address</Label>
<InputGroup>
<InputGroupAddon>
<InputGroupText>designali.com/</InputGroupText>
</InputGroupAddon>
<InputGroupInput id="store-url" defaultValue="templates" />
<InputGroupAddon align="inline-end">
<CircleCheckIcon className="text-primary dark:text-primary" />
</InputGroupAddon>
</InputGroup>
<p className="text-xs text-muted-foreground">
This address is available.
</p>
</div>
)
}
label-26
Loading...
import {
Lock as LockIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function ReadOnlyLockedLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="org-id" className="justify-between">
<span>Organization ID</span>
<span className="flex items-center gap-1 font-normal text-muted-foreground">
<LockIcon className="size-3" />
Managed by admin
</span>
</Label>
<Input
id="org-id"
readOnly
value="org_8F3kQ2xLm"
className="bg-muted font-sans"
/>
</div>
)
}
label-27
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
const dims = [
{ id: "pkg-weight", label: "Icon size", unit: "px", value: "24" },
{ id: "pkg-length", label: "Stroke", unit: "px", value: "1.5" },
{ id: "pkg-width", label: "Padding", unit: "px", value: "4" },
]
export function UnitSuffixLabels() {
return (
<div className="grid w-full max-w-sm grid-cols-3 gap-3">
{dims.map((dim) => (
<div key={dim.id} className="grid gap-2">
<Label htmlFor={dim.id}>
{dim.label}
<span className="font-normal text-muted-foreground">
({dim.unit})
</span>
</Label>
<Input id={dim.id} type="number" defaultValue={dim.value} />
</div>
))}
</div>
)
}
label-28
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
const tags = [
"Blocks",
"Templates",
"Icons",
"Logos",
"Illustrations",
"UI Designs",
]
export function FilterChipLabels() {
return (
<div className="flex w-full max-w-sm flex-wrap gap-2">
{tags.map((tag, i) => (
<Label
key={tag}
htmlFor={"chip-" + i}
className="cursor-pointer border px-3 py-1.5 transition-colors hover:bg-muted has-data-checked:border-primary has-data-checked:bg-primary has-data-checked:text-primary-foreground"
>
<Checkbox
id={"chip-" + i}
defaultChecked={i < 2}
className="sr-only"
/>
{tag}
</Label>
))}
</div>
)
}
label-29
Loading...
import { Label } from "@/components/ui/label"
import {
NativeSelect,
NativeSelectOption,
} from "@/components/ui/native-select"
export function NativeSelectLabel() {
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="country">Designali billing country</Label>
<NativeSelect id="country" defaultValue="ca" className="w-full">
<NativeSelectOption value="us">United States</NativeSelectOption>
<NativeSelectOption value="ca">Canada</NativeSelectOption>
<NativeSelectOption value="gb">United Kingdom</NativeSelectOption>
<NativeSelectOption value="de">Germany</NativeSelectOption>
</NativeSelect>
</div>
)
}
label-30
Loading...
import {
Calendar as CalendarIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function DateRangeLabels() {
return (
<div className="grid w-full max-w-sm grid-cols-2 gap-3">
<div className="grid gap-2">
<Label htmlFor="check-in">
<CalendarIcon className="size-3.5" />
Check-in
</Label>
<Input id="check-in" type="date" defaultValue="2026-12-18" />
</div>
<div className="grid gap-2">
<Label htmlFor="check-out">
<CalendarIcon className="size-3.5" />
Check-out
</Label>
<Input id="check-out" type="date" defaultValue="2026-12-22" />
</div>
</div>
)
}
label-31
Loading...
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function ShippingAddressLabels() {
return (
<div className="grid w-full max-w-md grid-cols-6 gap-3">
<div className="col-span-6 grid gap-2">
<Label htmlFor="addr-street">Ship Designali merch to</Label>
<Input id="addr-street" defaultValue="218 Willow Bend Rd" />
</div>
<div className="col-span-3 grid gap-2">
<Label htmlFor="addr-city">City</Label>
<Input id="addr-city" defaultValue="Portland" />
</div>
<div className="col-span-1 grid gap-2">
<Label htmlFor="addr-state">State</Label>
<Input id="addr-state" defaultValue="OR" />
</div>
<div className="col-span-2 grid gap-2">
<Label htmlFor="addr-zip">ZIP</Label>
<Input id="addr-zip" defaultValue="97205" />
</div>
</div>
)
}
label-32
Loading...
"use client"
import * as React from "react"
import {
Check as CheckIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Spinner } from "@/components/ui/spinner"
export function AutosaveStatusLabel() {
const [title, setTitle] = React.useState("Designali roadmap review")
const [saving, setSaving] = React.useState(false)
const timer = React.useRef<number | undefined>(undefined)
function handleChange(value: string) {
setTitle(value)
setSaving(true)
window.clearTimeout(timer.current)
timer.current = window.setTimeout(() => setSaving(false), 800)
}
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="doc-title">Document title</Label>
<span className="flex items-center gap-1 text-xs text-muted-foreground">
{saving ? (
<Spinner className="size-3" />
) : (
<CheckIcon className="size-3" />
)}
{saving ? "Saving..." : "Saved"}
</span>
</div>
<Input
id="doc-title"
value={title}
onChange={(e) => handleChange(e.target.value)}
/>
</div>
)
}
label-33
Loading...
"use client"
import * as React from "react"
import {
RotateCcw as RotateCcwIcon,
} from "@designali/icons"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function LabelWithResetAction() {
const [value, setValue] = React.useState("45")
const isDefault = value === "30"
return (
<div className="grid w-full max-w-xs gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="session-timeout">Session timeout (minutes)</Label>
<Button
variant="ghost"
size="xs"
disabled={isDefault}
onClick={() => setValue("30")}
>
<RotateCcwIcon data-icon="inline-start" />
Reset
</Button>
</div>
<Input
id="session-timeout"
type="number"
value={value}
onChange={(e) => setValue(e.target.value)}
/>
</div>
)
}
label-34
Loading...
"use client"
import * as React from "react"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { cn } from "@/lib/utils"
function strength(pw: string) {
let score = 0
if (pw.length >= 8) score++
if (/[A-Z]/.test(pw)) score++
if (/[0-9]/.test(pw)) score++
if (/[^A-Za-z0-9]/.test(pw)) score++
return score
}
const levels = ["Too short", "Weak", "Fair", "Good", "Strong"]
export function PasswordStrengthLabel() {
const [pw, setPw] = React.useState("Designali7")
const score = strength(pw)
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="new-password">New password</Label>
<span
className={cn(
"text-xs font-medium",
score >= 3
? "text-primary dark:text-primary"
: "text-primary dark:text-primary"
)}
>
{levels[score]}
</span>
</div>
<Input
id="new-password"
type="password"
value={pw}
onChange={(e) => setPw(e.target.value)}
/>
<div className="grid grid-cols-4 gap-1">
{[0, 1, 2, 3].map((i) => (
<span
key={i}
className={cn("h-1", i < score ? "bg-foreground" : "bg-muted")}
/>
))}
</div>
</div>
)
}
label-35
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
const addOns = [
{
id: "addon-wrap",
title: "Figma source files",
desc: "Editable Figma file for your Designali template",
price: "$4.00",
},
{
id: "addon-insure",
title: "Custom logo by Designali",
desc: "Brand mark designed by Ali Imam",
price: "$2.49",
},
{
id: "addon-express",
title: "Priority setup",
desc: "Deployed to Vercel in 1-2 business days",
price: "$9.00",
},
]
export function CheckoutAddOnLabels() {
return (
<div className="flex w-full max-w-sm flex-col gap-2">
{addOns.map((addOn, i) => (
<Label
key={addOn.id}
htmlFor={addOn.id}
className="items-start gap-3 border p-3 hover:bg-muted/40 has-data-checked:border-primary"
>
<Checkbox id={addOn.id} defaultChecked={i === 1} className="mt-0.5" />
<span className="flex flex-1 flex-col gap-1">
<span className="font-medium">{addOn.title}</span>
<span className="text-muted-foreground">{addOn.desc}</span>
</span>
<span className="font-medium tabular-nums">{addOn.price}</span>
</Label>
))}
</div>
)
}
label-36
Loading...
import { Label } from "@/components/ui/label"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
const methods = [
{ value: "standard", label: "Standard support", eta: "Reply from support@designali.com in 3 days", price: "Free" },
{
value: "priority",
label: "Priority support",
eta: "Reply within 24 hours",
price: "$7.50",
},
{
value: "overnight",
label: "Call with Ali Imam",
eta: "30-minute design review",
price: "$24.00",
},
]
export function ShippingMethodRadioLabels() {
return (
<RadioGroup
defaultValue="standard"
className="w-full max-w-sm gap-0 divide-y border"
>
{methods.map((method) => (
<div key={method.value} className="flex items-center gap-3 p-3">
<RadioGroupItem id={"ship-" + method.value} value={method.value} />
<Label
htmlFor={"ship-" + method.value}
className="flex-1 justify-between"
>
<span className="grid gap-1">
<span className="font-medium">{method.label}</span>
<span className="text-muted-foreground">{method.eta}</span>
</span>
<span className="font-medium">{method.price}</span>
</Label>
</div>
))}
</RadioGroup>
)
}
label-37
Loading...
import {
Search as SearchIcon,
} from "@designali/icons"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function VisuallyHiddenSearchLabel() {
return (
<div className="relative w-full max-w-sm">
<Label htmlFor="site-search" className="sr-only">
Search files
</Label>
<SearchIcon className="pointer-events-none absolute start-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
id="site-search"
type="search"
placeholder="Search Designali files and folders"
className="ps-8"
/>
</div>
)
}
label-38
Loading...
"use client"
import * as React from "react"
import {
Minus as MinusIcon,
Plus as PlusIcon,
} from "@designali/icons"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function QuantityStepperLabel() {
const [qty, setQty] = React.useState(2)
return (
<div className="grid w-fit gap-2">
<Label htmlFor="seat-qty">Seats</Label>
<div className="flex">
<Button
variant="outline"
size="icon"
aria-label="Remove seat"
onClick={() => setQty((q) => Math.max(1, q - 1))}
>
<MinusIcon />
</Button>
<Input
id="seat-qty"
type="number"
value={qty}
onChange={(e) => setQty(Number(e.target.value) || 1)}
className="w-16 border-x-0 text-center"
/>
<Button
variant="outline"
size="icon"
aria-label="Add seat"
onClick={() => setQty((q) => q + 1)}
>
<PlusIcon />
</Button>
</div>
<p className="text-xs text-muted-foreground">
{"$" + qty * 12}/month billed annually
</p>
</div>
)
}
label-39
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table"
const users = [
{ id: "u1", name: "Ali Imam", role: "Owner" },
{ id: "u2", name: "Studio Designer", role: "Editor" },
{ id: "u3", name: "Client Reviewer", role: "Viewer" },
]
export function TableRowSelectLabels() {
return (
<div className="w-full max-w-md border">
<Table>
<TableHeader>
<TableRow>
<TableHead className="w-8">
<Label htmlFor="select-all" className="sr-only">
Select all members
</Label>
<Checkbox id="select-all" />
</TableHead>
<TableHead>Member</TableHead>
<TableHead>Role</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{users.map((user) => (
<TableRow key={user.id}>
<TableCell>
<Label htmlFor={"row-" + user.id} className="sr-only">
Select {user.name}
</Label>
<Checkbox id={"row-" + user.id} />
</TableCell>
<TableCell className="font-medium">{user.name}</TableCell>
<TableCell className="text-muted-foreground">
{user.role}
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
)
}
label-40
Loading...
"use client"
import * as React from "react"
import {
Check as CheckIcon,
Copy as CopyIcon,
} from "@designali/icons"
import {
InputGroup,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
} from "@/components/ui/input-group"
import { Label } from "@/components/ui/label"
export function CopyableKeyLabel() {
const [copied, setCopied] = React.useState(false)
const secret = "whk_demo_8vR1"
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="webhook-secret">Signing secret</Label>
<InputGroup>
<InputGroupInput
id="webhook-secret"
readOnly
value={secret}
className="font-sans"
/>
<InputGroupAddon align="inline-end">
<InputGroupButton
size="icon-xs"
aria-label="Copy secret"
onClick={() => {
void navigator.clipboard?.writeText(secret)
setCopied(true)
}}
>
{copied ? <CheckIcon /> : <CopyIcon />}
</InputGroupButton>
</InputGroupAddon>
</InputGroup>
</div>
)
}
label-41
Loading...
"use client"
import * as React from "react"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
import { Switch } from "@/components/ui/switch"
const items = [
{ id: "p-status", label: "Show my published blocks" },
{ id: "p-read", label: "Show my templates" },
{ id: "p-typing", label: "Show my 21st.dev link" },
]
export function PrivacySwitchGroup() {
const [visible, setVisible] = React.useState(true)
return (
<div className="flex w-full max-w-sm flex-col gap-3 border p-4">
<div className="flex items-center justify-between">
<Label htmlFor="p-master" className="text-sm font-medium">
Show my Designali profile publicly
</Label>
<Switch id="p-master" checked={visible} onCheckedChange={setVisible} />
</div>
<Separator />
<div className="group flex flex-col gap-3 ps-2" data-disabled={!visible}>
{items.map((item) => (
<div key={item.id} className="flex items-center justify-between">
<Label htmlFor={item.id}>{item.label}</Label>
<Switch id={item.id} size="sm" defaultChecked disabled={!visible} />
</div>
))}
</div>
</div>
)
}
label-42
Loading...
import { Label } from "@/components/ui/label"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
import { cn } from "@/lib/utils"
const times = [
"9:00",
"9:30",
"10:00",
"11:30",
"13:00",
"14:30",
"15:00",
"16:30",
]
const taken = new Set(["10:00", "14:30"])
export function TimeSlotLabels() {
return (
<div className="flex w-full max-w-sm flex-col gap-3">
<span className="text-xs font-medium">Book a call with Ali Imam - Thursday, Dec 4</span>
<RadioGroup defaultValue="11:30" className="grid grid-cols-4 gap-2">
{times.map((time) => (
<Label
key={time}
htmlFor={"slot-" + time}
className={cn(
"justify-center border py-2 tabular-nums hover:bg-muted has-data-checked:border-primary has-data-checked:bg-primary has-data-checked:text-primary-foreground",
taken.has(time) && "pointer-events-none line-through opacity-40"
)}
>
<RadioGroupItem
id={"slot-" + time}
value={time}
disabled={taken.has(time)}
className="sr-only"
/>
{time}
</Label>
))}
</RadioGroup>
</div>
)
}
label-43
Loading...
import { Label } from "@/components/ui/label"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
export function RatingScaleLabels() {
return (
<div className="flex w-full max-w-sm flex-col gap-3">
<span className="text-sm font-medium">
How likely are you to recommend Designali templates?
</span>
<RadioGroup className="grid grid-cols-5 gap-1.5">
{[1, 2, 3, 4, 5].map((n) => (
<Label
key={n}
htmlFor={"rate-" + n}
className="h-10 justify-center border text-sm hover:bg-muted has-data-checked:border-primary has-data-checked:bg-primary/10"
>
<RadioGroupItem
id={"rate-" + n}
value={String(n)}
className="sr-only"
/>
{n}
</Label>
))}
</RadioGroup>
<div className="flex justify-between text-xs text-muted-foreground">
<span>Not likely</span>
<span>Very likely</span>
</div>
</div>
)
}
label-44
Loading...
"use client"
import * as React from "react"
import {
X as XIcon,
} from "@designali/icons"
import { Badge } from "@/components/ui/badge"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function TagCountLabel() {
const [tags, setTags] = React.useState(["onboarding", "billing", "urgent"])
const [draft, setDraft] = React.useState("")
return (
<div className="grid w-full max-w-sm gap-2">
<Label htmlFor="ticket-tags" className="justify-between">
<span>Tags</span>
<span className="font-normal text-muted-foreground">
{tags.length}/5
</span>
</Label>
<div className="flex flex-wrap gap-1">
{tags.map((tag) => (
<Badge key={tag} variant="secondary">
{tag}
<button
type="button"
aria-label={"Remove " + tag}
onClick={() => setTags(tags.filter((t) => t !== tag))}
>
<XIcon />
</button>
</Badge>
))}
</div>
<Input
id="ticket-tags"
value={draft}
disabled={tags.length >= 5}
placeholder="Type a tag and press Enter"
onChange={(e) => setDraft(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter" && draft.trim()) {
setTags([...tags, draft.trim()])
setDraft("")
}
}}
/>
</div>
)
}
label-45
Loading...
import {
Folder as FolderIcon,
} from "@designali/icons"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function TruncatedPathLabel() {
return (
<div className="grid w-full max-w-[16rem] gap-2 border p-3">
<Label htmlFor="rename-file" className="min-w-0">
<FolderIcon className="size-3.5 shrink-0 text-muted-foreground" />
<span
className="truncate text-muted-foreground"
title="Shared / Designali / 2026 Projects / Brand Identity / Assets"
>
Shared / Designali / 2026 Projects / Brand Identity / Assets
</span>
</Label>
<Input id="rename-file" defaultValue="designali-hero-final-v3.fig" />
<div className="flex justify-end gap-2">
<Button variant="ghost" size="sm">
Cancel
</Button>
<Button size="sm">Rename</Button>
</div>
</div>
)
}
label-46
Loading...
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
const people = [
{ id: "as-1", name: "Ali Imam", role: "Design", initials: "AI" },
{ id: "as-2", name: "Studio Developer", role: "Frontend", initials: "SD" },
{ id: "as-3", name: "Brand Designer", role: "Brand", initials: "BD" },
]
export function AssigneeCheckboxLabels() {
return (
<div className="flex w-full max-w-xs flex-col gap-1 border p-2">
<span className="px-2 py-1 text-xs font-medium text-muted-foreground">
Assign to
</span>
{people.map((person, i) => (
<Label
key={person.id}
htmlFor={person.id}
className="gap-3 p-2 hover:bg-muted"
>
<Checkbox id={person.id} defaultChecked={i === 0} />
<Avatar size="sm">
<AvatarFallback>{person.initials}</AvatarFallback>
</Avatar>
<span className="flex-1">{person.name}</span>
<span className="text-muted-foreground">{person.role}</span>
</Label>
))}
</div>
)
}
label-47
Loading...
"use client"
import * as React from "react"
import {
FileText as FileTextIcon,
} from "@designali/icons"
import { Checkbox } from "@/components/ui/checkbox"
import { Label } from "@/components/ui/label"
const files = ["contract-draft.pdf", "brand-guide.pdf", "invoice-1182.pdf"]
export function SelectAllIndeterminateLabel() {
const [selected, setSelected] = React.useState<string[]>(["brand-guide.pdf"])
const all = selected.length === files.length
const some = selected.length > 0 && !all
return (
<div className="flex w-full max-w-xs flex-col gap-3">
<div className="flex items-center gap-2 border-b pb-3">
<Checkbox
id="files-all"
checked={all}
indeterminate={some}
onCheckedChange={(checked) => setSelected(checked ? files : [])}
/>
<Label htmlFor="files-all" className="font-medium">
Select all
<span className="font-normal text-muted-foreground">
({selected.length} of {files.length})
</span>
</Label>
</div>
{files.map((file) => (
<div key={file} className="flex items-center gap-2 ps-4">
<Checkbox
id={"file-" + file}
checked={selected.includes(file)}
onCheckedChange={(checked) =>
setSelected(
checked
? [...selected, file]
: selected.filter((f) => f !== file)
)
}
/>
<Label htmlFor={"file-" + file}>
<FileTextIcon className="size-3.5 text-muted-foreground" />
{file}
</Label>
</div>
))}
</div>
)
}
label-48
Loading...
"use client"
import * as React from "react"
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
import { Textarea } from "@/components/ui/textarea"
export function DependentFieldLabel() {
const [enabled, setEnabled] = React.useState(false)
return (
<div className="flex w-full max-w-sm flex-col gap-4 border p-4">
<div className="flex items-center gap-2">
<Switch
id="auto-reply"
checked={enabled}
onCheckedChange={setEnabled}
/>
<Label htmlFor="auto-reply">Send an out-of-office reply</Label>
</div>
<div className="group grid gap-2" data-disabled={!enabled}>
<Label htmlFor="auto-reply-msg">Reply message</Label>
<Textarea
id="auto-reply-msg"
disabled={!enabled}
defaultValue="Thanks for reaching out to Designali. I'm away until Jan 6 and will reply when I'm back. – Ali"
className="min-h-20"
/>
</div>
</div>
)
}
label-49
Loading...
import { Checkbox } from "@/components/ui/checkbox"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function WrappingLabelImplicit() {
return (
<form className="flex w-full max-w-sm flex-col gap-4">
<Label className="flex-col items-start gap-2">
Display name
<Input defaultValue="Ali Imam" />
</Label>
<Label className="flex-col items-start gap-2">
Pronouns
<Input placeholder="they/them" />
</Label>
<Label className="gap-2">
<Checkbox defaultChecked />
Show pronouns on my profile
</Label>
</form>
)
}
label-50
Loading...
"use client"
import * as React from "react"
import {
InputGroup,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
InputGroupText,
} from "@/components/ui/input-group"
import { Label } from "@/components/ui/label"
export function AmountLabelWithBalance() {
const [amount, setAmount] = React.useState("")
return (
<div className="grid w-full max-w-sm gap-2">
<div className="flex items-center justify-between">
<Label htmlFor="amount">Designali payout</Label>
<span className="text-xs text-muted-foreground">
Available:{" "}
<span className="font-medium text-foreground">$3,218.40</span>
</span>
</div>
<InputGroup>
<InputGroupAddon>
<InputGroupText>$</InputGroupText>
</InputGroupAddon>
<InputGroupInput
id="amount"
inputMode="decimal"
placeholder="0.00"
value={amount}
onChange={(e) => setAmount(e.target.value)}
/>
<InputGroupAddon align="inline-end">
<InputGroupButton size="xs" onClick={() => setAmount("3218.40")}>
Max
</InputGroupButton>
</InputGroupAddon>
</InputGroup>
</div>
)
}
Categories
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Dialog
- Drawer
- Dropdown Menu
- Field
- Hover Card
- Input
- Input OTP
- Label
- Menubar
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip