alert-01
Loading...
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert className="max-w-80">
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
<p>Explore beautiful, customizable components built for modern web applications.</p>
</AlertDescription>
</Alert>
);
}alert-02
Loading...
import {
Info as InfoIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert className="max-w-80">
<InfoIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
</Alert>
);
}alert-03
Loading...
import {
Info as InfoIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
export function AlertDemo() {
return (
<Alert className="max-w-80">
<InfoIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
<AlertAction>
<Button size="xs" variant="ghost">
Dismiss
</Button>
<Button size="xs">Ok</Button>
</AlertAction>
</Alert>
);
}alert-04
Loading...
import {
Info as InfoIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert variant="info" className="max-w-80">
<InfoIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
</Alert>
);
}alert-05
Loading...
import {
CircleCheck as CircleCheckIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert variant="success" className="max-w-80">
<CircleCheckIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
</Alert>
);
}alert-06
Loading...
import {
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert variant="warning" className="max-w-80">
<TriangleAlertIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
</Alert>
);
}alert-07
Loading...
import {
CircleAlert as CircleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert";
export function AlertDemo() {
return (
<Alert variant="error" className="max-w-80">
<CircleAlertIcon />
<AlertTitle>Designali UI</AlertTitle>
<AlertDescription>
Explore beautiful, customizable components built for modern web applications.
</AlertDescription>
</Alert>
);
}alert-08
Loading...
"use client"
import * as React from "react"
import {
Timer as TimerIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertSessionExpiring() {
const [seconds, setSeconds] = React.useState(119)
React.useEffect(() => {
const id = setInterval(() => setSeconds((s) => (s > 0 ? s - 1 : 0)), 1000)
return () => clearInterval(id)
}, [])
const mm = Math.floor(seconds / 60)
const ss = String(seconds % 60).padStart(2, "0")
return (
<Alert variant="warning" className="max-w-md">
<TimerIcon />
<AlertTitle>
Your session expires in {mm}:{ss}
</AlertTitle>
<AlertDescription>
You'll be signed out to keep your designali.com account secure.
</AlertDescription>
<AlertAction>
<Button size="xs" onClick={() => setSeconds(15 * 60)}>
Stay signed in
</Button>
</AlertAction>
</Alert>
)
}
alert-09
Loading...
import {
CreditCard as CreditCardIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertPaymentFailed() {
return (
<Alert variant="error" className="max-w-md">
<CreditCardIcon />
<AlertTitle>Payment declined</AlertTitle>
<AlertDescription>
<p>
We couldn't charge your Visa ending 4821 for the $48.00 Designali Pro
renewal. Your template downloads stay active until Nov 22.
</p>
<div className="mt-2 flex gap-1.5">
<Button size="xs">Update card</Button>
<Button size="xs" variant="outline">
Retry payment
</Button>
</div>
</AlertDescription>
</Alert>
)
}
alert-10
Loading...
"use client"
import * as React from "react"
import {
Megaphone as MegaphoneIcon,
RotateCcw as RotateCcwIcon,
X as XIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertDismissible() {
const [open, setOpen] = React.useState(true)
if (!open) {
return (
<Button size="sm" variant="outline" onClick={() => setOpen(true)}>
<RotateCcwIcon data-icon="inline-start" />
Show announcement
</Button>
)
}
return (
<Alert variant="info" className="max-w-md">
<MegaphoneIcon />
<AlertTitle>Dark mode is live on designali.com</AlertTitle>
<AlertDescription>
Preview every block and template in dark mode from the avatar menu, or follow your system setting.
</AlertDescription>
<AlertAction>
<Button
size="icon-xs"
variant="ghost"
aria-label="Dismiss"
onClick={() => setOpen(false)}
>
<XIcon />
</Button>
</AlertAction>
</Alert>
)
}
alert-11
Loading...
import {
HardDrive as HardDriveIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Progress } from "@/components/ui/progress"
export function AlertStorageUsage() {
const used = 9.2
const limit = 10
return (
<Alert variant="warning" className="max-w-md">
<HardDriveIcon />
<AlertTitle>You're almost out of storage</AlertTitle>
<AlertDescription className="space-y-2">
<p>
{used} GB of {limit} GB used. Figma and asset uploads to your
Designali project will pause at the limit.
</p>
<Progress value={(used / limit) * 100} aria-label="Storage used" />
<Button size="xs" variant="outline">
Upgrade storage
</Button>
</AlertDescription>
</Alert>
)
}
alert-12
Loading...
"use client"
import {
CircleAlert as CircleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
const errors = [
{ field: "email", message: "Enter a valid work email" },
{ field: "password", message: "Password must be at least 12 characters" },
]
export function AlertFormErrorSummary() {
return (
<form
className="w-full max-w-sm space-y-3"
onSubmit={(e) => e.preventDefault()}
>
<Alert variant="error">
<CircleAlertIcon />
<AlertTitle>Fix 2 fields to continue</AlertTitle>
<AlertDescription>
<ul className="list-disc ps-4">
{errors.map((error) => (
<li key={error.field}>
<a href={"#" + error.field}>{error.message}</a>
</li>
))}
</ul>
</AlertDescription>
</Alert>
<div className="space-y-1.5">
<Label htmlFor="email">Work email</Label>
<Input id="email" defaultValue="sara@" aria-invalid />
</div>
<div className="space-y-1.5">
<Label htmlFor="password">Password</Label>
<Input
id="password"
type="password"
defaultValue="short"
aria-invalid
/>
</div>
<Button type="submit" className="w-full">
Create Designali account
</Button>
</form>
)
}
alert-13
Loading...
"use client"
import * as React from "react"
import {
CircleCheck as CircleCheckIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Spinner } from "@/components/ui/spinner"
export function AlertSaveFeedback() {
const [state, setState] = React.useState<"idle" | "saving" | "saved">("idle")
const save = () => {
setState("saving")
setTimeout(() => setState("saved"), 1200)
}
return (
<div className="w-full max-w-sm space-y-3">
<div className="space-y-1.5">
<Label htmlFor="workspace">Workspace name</Label>
<Input
id="workspace"
defaultValue="Designali Studio"
onChange={() => setState("idle")}
/>
</div>
<Button size="sm" onClick={save} disabled={state === "saving"}>
{state === "saving" && <Spinner data-icon="inline-start" />}
{state === "saving" ? "Saving..." : "Save changes"}
</Button>
{state === "saved" && (
<Alert variant="success">
<CircleCheckIcon />
<AlertTitle>Changes saved</AlertTitle>
<AlertDescription>
Everyone on the Designali studio team will see the new name.
</AlertDescription>
</Alert>
)}
</div>
)
}
alert-14
Loading...
import {
CalendarPlus as CalendarPlusIcon,
Wrench as WrenchIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertScheduledMaintenance() {
return (
<Alert variant="info" className="max-w-md">
<WrenchIcon />
<AlertTitle>Scheduled maintenance</AlertTitle>
<AlertDescription>
<p>
Sunday, Nov 23 from <time>02:00</time> to <time>04:00</time> UTC. The
designali.com dashboard will be read-only; downloads stay online.
</p>
<Button size="xs" variant="outline" className="mt-2">
<CalendarPlusIcon data-icon="inline-start" />
Add to calendar
</Button>
</AlertDescription>
</Alert>
)
}
alert-15
Loading...
import {
Hourglass as HourglassIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
export function AlertTrialEnding() {
return (
<Alert className="max-w-md">
<HourglassIcon />
<AlertTitle className="flex items-center gap-2">
Your trial ends soon
<Badge variant="secondary">3 days left</Badge>
</AlertTitle>
<AlertDescription>
Upgrade to Designali Pro to keep access to 460+ blocks, templates and Figma files.
</AlertDescription>
<AlertAction>
<Button size="xs">Upgrade</Button>
</AlertAction>
</Alert>
)
}
alert-16
Loading...
import {
CircleCheck as CircleCheckIcon,
CircleX as CircleXIcon,
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
const checks = [
{
variant: "success" as const,
icon: CircleCheckIcon,
title: "Build passed",
body: "designali.com compiled on Vercel in 48s with no warnings.",
},
{
variant: "warning" as const,
icon: TriangleAlertIcon,
title: "Bundle size grew 14%",
body: "The /templates route is now 212 kB gzipped.",
},
{
variant: "error" as const,
icon: CircleXIcon,
title: "2 tests failing",
body: "blocks/pricing.test.ts and icons/export.test.ts",
},
]
export function AlertDeployChecks() {
return (
<div className="w-full max-w-md space-y-2">
<p className="text-sm font-medium">Pre-deploy checks</p>
{checks.map((check) => (
<Alert key={check.title} variant={check.variant}>
<check.icon />
<AlertTitle>{check.title}</AlertTitle>
<AlertDescription>{check.body}</AlertDescription>
</Alert>
))}
</div>
)
}
alert-17
Loading...
"use client"
import * as React from "react"
import {
Wifi as WifiIcon,
WifiOff as WifiOffIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
export function AlertOfflineStatus() {
const [online, setOnline] = React.useState(false)
return (
<div className="w-full max-w-md space-y-3">
<div className="flex items-center gap-2">
<Switch id="network" checked={online} onCheckedChange={setOnline} />
<Label htmlFor="network">Simulate network connection</Label>
</div>
{online ? (
<Alert variant="success">
<WifiIcon />
<AlertTitle>Back online</AlertTitle>
<AlertDescription>3 queued edits to your Designali project were synced.</AlertDescription>
</Alert>
) : (
<Alert variant="warning">
<WifiOffIcon />
<AlertTitle>You're offline</AlertTitle>
<AlertDescription>
Edits are saved on this device and will sync when you reconnect.
</AlertDescription>
</Alert>
)}
</div>
)
}
alert-18
Loading...
"use client"
import * as React from "react"
import {
Mail as MailIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertVerifyEmail() {
const [cooldown, setCooldown] = React.useState(0)
React.useEffect(() => {
if (cooldown === 0) return
const id = setTimeout(() => setCooldown((c) => c - 1), 1000)
return () => clearTimeout(id)
}, [cooldown])
return (
<Alert variant="info" className="max-w-md">
<MailIcon />
<AlertTitle>Confirm your email address</AlertTitle>
<AlertDescription>
We sent a link to{" "}
<span className="font-medium text-foreground">
sara@example.com
</span>
. Check your inbox to unlock your Designali downloads.
</AlertDescription>
<AlertAction>
<Button
size="xs"
variant="outline"
disabled={cooldown > 0}
onClick={() => setCooldown(30)}
>
{cooldown > 0 ? "Resend in " + cooldown + "s" : "Resend"}
</Button>
</AlertAction>
</Alert>
)
}
alert-19
Loading...
import {
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
export function AlertApiDeprecation() {
return (
<Alert variant="warning" className="max-w-md">
<TriangleAlertIcon />
<AlertTitle>
<code className="bg-muted px-1 font-mono">GET /v1/blocks</code> is
deprecated
</AlertTitle>
<AlertDescription>
<p>
It will stop responding on March 1, 2027. Use{" "}
<code className="bg-muted px-1 font-mono text-foreground">
GET /v2/registry
</code>{" "}
instead, which serves all 460+ Designali blocks with cursor pagination.
</p>
<p>
<a href="#">Read the migration guide in /docs</a>
</p>
</AlertDescription>
</Alert>
)
}
alert-20
Loading...
"use client"
import * as React from "react"
import {
MonitorSmartphone as MonitorSmartphoneIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertNewSignIn() {
const [answer, setAnswer] = React.useState<"me" | "secure" | null>(null)
return (
<Alert
variant={answer === "secure" ? "error" : "default"}
className="max-w-md"
>
<MonitorSmartphoneIcon />
<AlertTitle>New sign-in to your designali.com account</AlertTitle>
<AlertDescription>
<dl className="my-1 grid grid-cols-[auto_1fr] gap-x-3">
<dt>Device</dt>
<dd className="text-foreground">Firefox on Windows</dd>
<dt>Location</dt>
<dd className="text-foreground">New Delhi, IN</dd>
<dt>Time</dt>
<dd className="text-foreground">Today at 08:14</dd>
</dl>
{answer === null ? (
<div className="mt-2 flex gap-1.5">
<Button size="xs" variant="outline" onClick={() => setAnswer("me")}>
This was me
</Button>
<Button
size="xs"
variant="destructive"
onClick={() => setAnswer("secure")}
>
Secure account
</Button>
</div>
) : (
<p className="mt-2 text-foreground">
{answer === "me"
? "Thanks, we’ll remember this device."
: "We signed out all sessions. Check your email to reset your password."}
</p>
)}
</AlertDescription>
</Alert>
)
}
alert-21
Loading...
"use client"
import * as React from "react"
import {
Check as CheckIcon,
Copy as CopyIcon,
KeyRound as KeyRoundIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const codes = [
"4F7K-92QD",
"M8TZ-1LXA",
"Q3VB-7HNP",
"C6RW-0YJE",
"T2GS-5KMU",
"H9DN-8PFC",
]
export function AlertRecoveryCodes() {
const [copied, setCopied] = React.useState(false)
const copy = async () => {
await navigator.clipboard?.writeText(codes.join("\n"))
setCopied(true)
setTimeout(() => setCopied(false), 1500)
}
return (
<Alert variant="warning" className="max-w-md">
<KeyRoundIcon />
<AlertTitle>Save your designali.com recovery codes</AlertTitle>
<AlertDescription className="space-y-2">
<p>
Each code works once. Store them somewhere safe, you won't see
them again.
</p>
<div className="grid grid-cols-2 gap-1 border bg-background p-2 font-sans text-foreground sm:grid-cols-3">
{codes.map((code) => (
<span key={code}>{code}</span>
))}
</div>
<Button size="xs" variant="outline" onClick={copy}>
{copied ? (
<CheckIcon data-icon="inline-start" />
) : (
<CopyIcon data-icon="inline-start" />
)}
{copied ? "Copied" : "Copy codes"}
</Button>
</AlertDescription>
</Alert>
)
}
alert-22
Loading...
"use client"
import * as React from "react"
import {
ChevronDown as ChevronDownIcon,
FileCheck as FileCheckIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
const skipped = [
{ row: 14, reason: "Missing SVG path" },
{ row: 87, reason: "Duplicate of row 12" },
{ row: 203, reason: "Invalid icon name" },
]
export function AlertImportResult() {
const [showDetails, setShowDetails] = React.useState(false)
return (
<Alert variant="success" className="max-w-md">
<FileCheckIcon />
<AlertTitle>Imported 1,248 icons into @designali/icons</AlertTitle>
<AlertDescription>
<p>
{skipped.length} rows were skipped and can be fixed in your
icon manifest.
</p>
<Button
size="xs"
variant="link"
className="h-auto px-0"
onClick={() => setShowDetails((s) => !s)}
aria-expanded={showDetails}
>
{showDetails ? "Hide details" : "Show skipped rows"}
<ChevronDownIcon
data-icon="inline-end"
className={cn("transition-transform", showDetails && "rotate-180")}
/>
</Button>
{showDetails && (
<ul className="mt-1 border-t pt-1">
{skipped.map((item) => (
<li key={item.row} className="flex justify-between">
<span className="font-sans">Row {item.row}</span>
<span>{item.reason}</span>
</li>
))}
</ul>
)}
</AlertDescription>
</Alert>
)
}
alert-23
Loading...
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
export function AlertMentionWithAvatar() {
return (
<Alert className="max-w-md grid-cols-[auto_1fr] gap-x-2.5">
<Avatar className="row-span-2">
<AvatarImage src="/ali.jpg" alt="Ali Imam" />
<AvatarFallback>AI</AvatarFallback>
</Avatar>
<AlertTitle className="col-start-2">Ali Imam mentioned you</AlertTitle>
<AlertDescription className="col-start-2">
“Can you check the Designali pricing table copy before we publish?” in{" "}
<span className="font-medium text-foreground">designali.com launch</span>
</AlertDescription>
<AlertAction>
<Button size="xs" variant="outline">
Reply
</Button>
</AlertAction>
</Alert>
)
}
alert-24
Loading...
import {
FlaskConical as FlaskConicalIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Badge } from "@/components/ui/badge"
export function AlertBetaFeature() {
return (
<Alert className="max-w-md">
<FlaskConicalIcon />
<AlertTitle className="flex items-center gap-2">
AI summaries
<Badge variant="outline">Beta</Badge>
</AlertTitle>
<AlertDescription>
Designali AI summarises client feedback threads with more than 10 replies. Results
may be imperfect. <a href="#">Share feedback</a>
</AlertDescription>
</Alert>
)
}
alert-25
Loading...
"use client"
import * as React from "react"
import {
Trash as TrashIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function AlertDangerZoneConfirm() {
const [value, setValue] = React.useState("")
const name = "designali-client-site"
return (
<div className="w-full max-w-sm space-y-3">
<Alert variant="error">
<TrashIcon />
<AlertTitle>Delete this workspace</AlertTitle>
<AlertDescription>
All 42 Figma files, Next.js builds and client access will be permanently removed.
This cannot be undone.
</AlertDescription>
</Alert>
<div className="space-y-1.5">
<Label htmlFor="confirm" className="font-normal">
Type <span className="font-sans font-medium">{name}</span> to confirm
</Label>
<Input
id="confirm"
value={value}
onChange={(e) => setValue(e.target.value)}
autoComplete="off"
/>
</div>
<Button
variant="destructive"
className="w-full"
disabled={value !== name}
>
Delete workspace
</Button>
</div>
)
}
alert-26
Loading...
import {
FileX as FileXIcon,
Upload as UploadIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertUploadTooLarge() {
return (
<div className="w-full max-w-md space-y-2">
<div className="flex flex-col items-center gap-1 border border-dashed py-6 text-center">
<UploadIcon className="size-5 text-muted-foreground" />
<p className="text-xs font-medium">Drop files to upload</p>
<p className="text-xs text-muted-foreground">
PDF, PNG or JPG up to 25 MB
</p>
</div>
<Alert variant="error">
<FileXIcon />
<AlertTitle>Upload failed</AlertTitle>
<AlertDescription>
<span className="font-sans text-foreground">designali-brand-guide.pdf</span>{" "}
is 61.4 MB, which is over the 25 MB limit.
</AlertDescription>
<AlertAction>
<Button size="xs" variant="outline">
Choose another
</Button>
</AlertAction>
</Alert>
</div>
)
}
alert-27
Loading...
"use client"
import {
Check as CheckIcon,
RefreshCw as RefreshCwIcon,
Sparkles as SparklesIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const highlights = [
"Faster search across 4000+ icons",
"New Abstract vector shapes",
"Copy blocks straight into Next.js",
]
export function AlertUpdateAvailable() {
return (
<Alert variant="info" className="max-w-md">
<SparklesIcon />
<AlertTitle>Designali 4.2 is ready</AlertTitle>
<AlertDescription>
<ul className="my-1 space-y-0.5">
{highlights.map((item) => (
<li key={item} className="flex items-center gap-1.5">
<CheckIcon className="size-3" />
{item}
</li>
))}
</ul>
</AlertDescription>
<AlertAction>
<Button size="xs" onClick={() => window.location.reload()}>
<RefreshCwIcon data-icon="inline-start" />
Reload
</Button>
</AlertAction>
</Alert>
)
}
alert-28
Loading...
import {
CircleCheck as CircleCheckIcon,
CircleX as CircleXIcon,
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import { Alert, AlertTitle } from "@/components/ui/alert"
const services = [
{
name: "designali.com",
status: "Operational",
variant: "success" as const,
icon: CircleCheckIcon,
},
{
name: "Blocks registry",
status: "Operational",
variant: "success" as const,
icon: CircleCheckIcon,
},
{
name: "Template downloads",
status: "Degraded performance",
variant: "warning" as const,
icon: TriangleAlertIcon,
},
{
name: "Order emails",
status: "Partial outage",
variant: "error" as const,
icon: CircleXIcon,
},
]
export function AlertServiceStatusStrip() {
return (
<div className="w-full max-w-sm space-y-1.5">
{services.map((service) => (
<Alert
key={service.name}
variant={service.variant}
className="items-center py-1.5 *:[svg]:row-span-1"
>
<service.icon className="size-3.5" />
<AlertTitle className="flex justify-between gap-2">
{service.name}
<span className="font-normal text-muted-foreground">
{service.status}
</span>
</AlertTitle>
</Alert>
))}
</div>
)
}
alert-29
Loading...
import {
CalendarX as CalendarXIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card"
export function AlertExpiredCardInCard() {
return (
<Card className="w-full max-w-sm">
<CardHeader>
<CardTitle>Payment method</CardTitle>
<CardDescription>Used for your Designali Pro renewal.</CardDescription>
</CardHeader>
<CardContent className="space-y-3">
<Alert variant="error">
<CalendarXIcon />
<AlertTitle>Card expired</AlertTitle>
<AlertDescription>
Your next invoice on Dec 1 will fail unless you update it.
</AlertDescription>
</Alert>
<div className="flex items-center gap-3 border p-2.5">
<span className="flex h-7 w-10 items-center justify-center bg-muted text-[10px] font-semibold">
VISA
</span>
<div className="flex-1 text-xs">
<p className="font-medium">•••• 4821</p>
<p className="text-muted-foreground">Expired 10/26</p>
</div>
<Button size="xs">Replace</Button>
</div>
</CardContent>
</Card>
)
}
alert-30
Loading...
"use client"
import * as React from "react"
import {
CircleCheck as CircleCheckIcon,
Link as LinkIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
export function AlertAutoHide() {
const [visible, setVisible] = React.useState(false)
const [draining, setDraining] = React.useState(false)
React.useEffect(() => {
if (!visible) return
const start = setTimeout(() => setDraining(true), 30)
const hide = setTimeout(() => {
setVisible(false)
setDraining(false)
}, 4000)
return () => {
clearTimeout(start)
clearTimeout(hide)
}
}, [visible])
return (
<div className="relative flex h-40 w-full max-w-sm flex-col items-center justify-center border border-dashed">
<Button size="sm" variant="outline" onClick={() => setVisible(true)}>
<LinkIcon data-icon="inline-start" />
Copy invite link
</Button>
{visible && (
<Alert
variant="success"
className="absolute inset-x-3 bottom-3 w-auto overflow-hidden bg-background shadow-md"
>
<CircleCheckIcon />
<AlertTitle>Invite link copied</AlertTitle>
<AlertDescription>
Anyone with the link can view this Designali client project.
</AlertDescription>
<span
aria-hidden
className={cn(
"absolute start-0 bottom-0 h-0.5 w-full origin-left bg-foreground/40 transition-transform duration-[3900ms] ease-linear",
draining ? "scale-x-0" : "scale-x-100"
)}
/>
</Alert>
)}
</div>
)
}
alert-31
Loading...
"use client"
import * as React from "react"
import {
Gauge as GaugeIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertRateLimited() {
const [wait, setWait] = React.useState(20)
React.useEffect(() => {
if (wait === 0) return
const id = setTimeout(() => setWait((w) => w - 1), 1000)
return () => clearTimeout(id)
}, [wait])
return (
<Alert variant="error" className="max-w-md">
<GaugeIcon />
<AlertTitle>Too many requests</AlertTitle>
<AlertDescription>
You've hit the limit of 60 icon exports per hour.{" "}
{wait > 0
? "Try again in " + wait + " seconds."
: "You can try again now."}
</AlertDescription>
<AlertAction>
<Button
size="xs"
variant="outline"
disabled={wait > 0}
onClick={() => setWait(20)}
>
Retry
</Button>
</AlertAction>
</Alert>
)
}
alert-32
Loading...
import {
CircleCheck as CircleCheckIcon,
Circle as CircleIcon,
Rocket as RocketIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Progress } from "@/components/ui/progress"
import { cn } from "@/lib/utils"
const steps = [
{ label: "Pick a Designali template", done: true },
{ label: "Customize brand colors", done: true },
{ label: "Connect your domain", done: false },
{ label: "Deploy to Vercel", done: false },
]
export function AlertSetupProgress() {
const done = steps.filter((s) => s.done).length
return (
<Alert className="max-w-md">
<RocketIcon />
<AlertTitle>Finish launching your Designali site</AlertTitle>
<AlertDescription className="space-y-2">
<Progress
value={(done / steps.length) * 100}
aria-label="Setup progress"
/>
<ul className="space-y-1">
{steps.map((step) => (
<li
key={step.label}
className={cn(
"flex items-center gap-1.5",
step.done && "line-through"
)}
>
{step.done ? (
<CircleCheckIcon className="size-3.5" />
) : (
<CircleIcon className="size-3.5" />
)}
{step.label}
</li>
))}
</ul>
</AlertDescription>
<AlertAction>
<span className="text-xs text-muted-foreground">
{done}/{steps.length}
</span>
</AlertAction>
</Alert>
)
}
alert-33
Loading...
import {
Send as SendIcon,
ShieldAlert as ShieldAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
export function AlertChatModeration() {
return (
<div className="w-full max-w-sm border">
<div className="space-y-2 p-3 text-xs">
<div className="flex gap-2">
<Avatar size="sm">
<AvatarFallback>SK</AvatarFallback>
</Avatar>
<p className="bg-muted px-2.5 py-1.5">
Is there a Figma file for the Designali dashboard blocks?
</p>
</div>
</div>
<div className="space-y-2 border-t p-3">
<Alert variant="warning">
<ShieldAlertIcon />
<AlertTitle>Message held for review</AlertTitle>
<AlertDescription>
It looks like it contains a phone number. Designali community rules
don't allow sharing personal contact details.
</AlertDescription>
</Alert>
<div className="flex gap-2">
<Input defaultValue="Call me on 06 1234 5678" aria-label="Message" />
<Button size="icon" aria-label="Send" disabled>
<SendIcon />
</Button>
</div>
</div>
</div>
)
}
alert-34
Loading...
import {
CalendarClock as CalendarClockIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertCalendarConflict() {
return (
<div className="w-full max-w-sm space-y-2">
<div className="border p-3 text-xs">
<p className="font-medium">Designali client kickoff</p>
<p className="text-muted-foreground">
Thu, Nov 20 · 14:00 to 15:30
</p>
</div>
<Alert variant="warning">
<CalendarClockIcon />
<AlertTitle>Conflicts with “Figma handoff review”</AlertTitle>
<AlertDescription>
<p>Ali Imam and 2 others are busy from 14:30 to 15:00.</p>
<div className="mt-2 flex flex-wrap gap-1.5">
<Button size="xs">Find a new time</Button>
<Button size="xs" variant="ghost">
Keep both
</Button>
</div>
</AlertDescription>
</Alert>
</div>
)
}
alert-35
Loading...
"use client"
import * as React from "react"
import {
Clock as ClockIcon,
Lock as LockIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertPermissionDenied() {
const [requested, setRequested] = React.useState(false)
return (
<Alert variant={requested ? "info" : "error"} className="max-w-md">
{requested ? <ClockIcon /> : <LockIcon />}
<AlertTitle>
{requested ? "Request sent" : "You don’t have access to this report"}
</AlertTitle>
<AlertDescription>
{requested
? "We’ll email you when Ali Imam responds."
: "Designali template sales are shared with the studio only. Ask the owner, Ali Imam, for access."}
</AlertDescription>
{!requested && (
<AlertAction>
<Button size="xs" onClick={() => setRequested(true)}>
Request access
</Button>
</AlertAction>
)}
</Alert>
)
}
alert-36
Loading...
"use client"
import * as React from "react"
import {
Pencil as PencilIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Label } from "@/components/ui/label"
import { Textarea } from "@/components/ui/textarea"
const initial = "Weekly Designali updates: new blocks, templates and icons."
export function AlertUnsavedChanges() {
const [saved, setSaved] = React.useState(initial)
const [value, setValue] = React.useState(initial)
const dirty = value !== saved
return (
<div className="w-full max-w-sm space-y-3">
{dirty && (
<Alert variant="warning">
<PencilIcon />
<AlertTitle>You have unsaved changes</AlertTitle>
<AlertDescription>
<div className="mt-1 flex gap-1.5">
<Button size="xs" onClick={() => setSaved(value)}>
Save
</Button>
<Button size="xs" variant="ghost" onClick={() => setValue(saved)}>
Discard
</Button>
</div>
</AlertDescription>
</Alert>
)}
<div className="space-y-1.5">
<Label htmlFor="channel-desc">Channel description</Label>
<Textarea
id="channel-desc"
value={value}
onChange={(e) => setValue(e.target.value)}
rows={3}
/>
</div>
</div>
)
}
alert-37
Loading...
"use client"
import * as React from "react"
import {
Lightbulb as LightbulbIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Kbd, KbdGroup } from "@/components/ui/kbd"
import { Label } from "@/components/ui/label"
export function AlertShortcutTip() {
const [hidden, setHidden] = React.useState(false)
const [remember, setRemember] = React.useState(false)
if (hidden) {
return (
<p className="text-xs text-muted-foreground">
{remember ? "Tip hidden for good." : "Tip hidden for this session."}
</p>
)
}
return (
<Alert className="max-w-md">
<LightbulbIcon />
<AlertTitle className="flex flex-wrap items-center gap-1">
Tip: press
<KbdGroup>
<Kbd>Ctrl</Kbd>
<Kbd>K</Kbd>
</KbdGroup>
to search Designali blocks
</AlertTitle>
<AlertDescription>
<div className="mt-1 flex items-center justify-between gap-2">
<div className="flex items-center gap-1.5">
<Checkbox
id="tip-remember"
checked={remember}
onCheckedChange={setRemember}
/>
<Label
htmlFor="tip-remember"
className="font-normal text-muted-foreground"
>
Don't show again
</Label>
</div>
<Button size="xs" variant="ghost" onClick={() => setHidden(true)}>
Got it
</Button>
</div>
</AlertDescription>
</Alert>
)
}
alert-38
Loading...
import {
ScrollText as ScrollTextIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
export function AlertPolicyUpdate() {
return (
<Alert className="max-w-md">
<ScrollTextIcon />
<AlertTitle>We're updating our terms</AlertTitle>
<AlertDescription>
<p>
On January 1, 2027 our Terms of Service and Privacy Policy change to
cover new commercial licensing options for Designali templates.
</p>
<p>
Continuing to use designali.com after that date means you accept the new
terms. Review the <a href="/docs/legal/terms">Terms of Service</a> and the{" "}
<a href="#">Privacy Policy</a>.
</p>
</AlertDescription>
</Alert>
)
}
alert-39
Loading...
"use client"
import * as React from "react"
import {
Bell as BellIcon,
CircleCheck as CircleCheckIcon,
CircleX as CircleXIcon,
Info as InfoIcon,
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const variants = [
{
value: "default" as const,
icon: BellIcon,
title: "Heads up",
body: "Your weekly Designali sales report is ready.",
},
{
value: "info" as const,
icon: InfoIcon,
title: "New in reports",
body: "You can now email template sales to billing@designali.com.",
},
{
value: "success" as const,
icon: CircleCheckIcon,
title: "Report sent",
body: "Delivered to 12 studio teammates.",
},
{
value: "warning" as const,
icon: TriangleAlertIcon,
title: "Partial data",
body: "Two storefronts haven’t synced since yesterday.",
},
{
value: "error" as const,
icon: CircleXIcon,
title: "Export failed",
body: "The report was too large to attach.",
},
]
export function AlertVariantPlayground() {
const [index, setIndex] = React.useState(0)
const current = variants[index] ?? variants[0]!
return (
<div className="w-full max-w-md space-y-3">
<div className="flex flex-wrap gap-1">
{variants.map((variant, i) => (
<Button
key={variant.value}
size="xs"
variant={i === index ? "default" : "outline"}
onClick={() => setIndex(i)}
>
{variant.value}
</Button>
))}
</div>
<Alert variant={current.value}>
<current.icon />
<AlertTitle>{current.title}</AlertTitle>
<AlertDescription>{current.body}</AlertDescription>
</Alert>
</div>
)
}
alert-40
Loading...
import {
Truck as TruckIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
export function AlertShippingDelay() {
return (
<div className="w-full max-w-sm space-y-3">
<div className="flex items-center justify-between text-xs">
<div>
<p className="font-medium">Project #48213</p>
<p className="text-muted-foreground">Designali · Brand identity</p>
</div>
<Badge variant="secondary">In review</Badge>
</div>
<Alert variant="info">
<TruckIcon />
<AlertTitle>Your Figma handoff is running late</AlertTitle>
<AlertDescription>
An extra feedback round moved the handoff. New estimate:{" "}
<span className="font-medium text-foreground">Wed, Nov 19</span>{" "}
<span className="line-through">Mon, Nov 17</span>
</AlertDescription>
</Alert>
<Button size="sm" variant="outline" className="w-full">
View project
</Button>
</div>
)
}
alert-41
Loading...
import {
Package as PackageIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const items = [
{ sku: "TPL-PORTFOLIO", name: "Portfolio template launch seats", left: 4 },
{ sku: "TPL-AGENCY", name: "Design agency template seats", left: 7 },
{ sku: "KIT-BLOCKS", name: "Blocks early-bird licences", left: 2 },
]
export function AlertLowStock() {
return (
<Alert variant="warning" className="max-w-md">
<PackageIcon />
<AlertTitle>3 Designali offers are almost sold out</AlertTitle>
<AlertDescription>
<table className="my-1 w-full">
<tbody>
{items.map((item) => (
<tr key={item.sku} className="border-b last:border-0">
<td className="py-1 pe-2 font-sans text-[10px]">{item.sku}</td>
<td className="py-1 text-foreground">{item.name}</td>
<td className="py-1 text-end font-medium text-foreground">
{item.left} left
</td>
</tr>
))}
</tbody>
</table>
<Button size="xs" variant="outline" className="mt-1">
Add more seats
</Button>
</AlertDescription>
</Alert>
)
}
alert-42
Loading...
import {
ArrowUpRight as ArrowUpRightIcon,
DatabaseBackup as DatabaseBackupIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertBackupComplete() {
return (
<Alert variant="success" className="max-w-md">
<DatabaseBackupIcon />
<AlertTitle>Nightly backup complete</AlertTitle>
<AlertDescription>
<p>
<span className="text-foreground">designali-prod</span> · 18.4 GB
· finished 03:12 UTC
</p>
</AlertDescription>
<AlertAction>
<Button
size="xs"
variant="ghost"
nativeButton={false}
render={<a href="#" />}
>
View logs
<ArrowUpRightIcon data-icon="inline-end" />
</Button>
</AlertAction>
</Alert>
)
}
alert-43
Loading...
"use client"
import * as React from "react"
import {
Check as CheckIcon,
Copy as CopyIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { Spinner } from "@/components/ui/spinner"
export function AlertDnsPending() {
const [copied, setCopied] = React.useState(false)
const record = "verify=designali-7c21f9a4e0"
return (
<Alert className="max-w-md">
<Spinner />
<AlertTitle>Waiting for DNS verification</AlertTitle>
<AlertDescription className="space-y-2">
<p>
Add this TXT record to{" "}
<span className="font-medium text-foreground">
studio.designali.com
</span>
. Changes can take up to 24 hours.
</p>
<div className="flex items-center gap-1 border bg-muted/50 ps-2">
<code className="flex-1 truncate font-mono text-foreground">
{record}
</code>
<Button
size="icon-xs"
variant="ghost"
aria-label="Copy record"
onClick={() => {
navigator.clipboard?.writeText(record)
setCopied(true)
}}
>
{copied ? <CheckIcon /> : <CopyIcon />}
</Button>
</div>
</AlertDescription>
</Alert>
)
}
alert-44
Loading...
"use client"
import * as React from "react"
import {
CloudCheck as CloudCheckIcon,
} from "@designali/icons"
import { Alert, AlertTitle } from "@/components/ui/alert"
import { Spinner } from "@/components/ui/spinner"
import { Textarea } from "@/components/ui/textarea"
export function AlertAutosaveStatus() {
const [status, setStatus] = React.useState<"saved" | "saving">("saved")
const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null)
const onChange = () => {
setStatus("saving")
if (timer.current) clearTimeout(timer.current)
timer.current = setTimeout(() => setStatus("saved"), 900)
}
return (
<div className="w-full max-w-sm space-y-2">
<Alert role="status" aria-live="polite" className="border-dashed py-1.5">
{status === "saving" ? (
<Spinner className="size-3.5" />
) : (
<CloudCheckIcon className="size-3.5" />
)}
<AlertTitle className="font-normal text-muted-foreground">
{status === "saving"
? "Saving draft..."
: "All changes saved to the cloud"}
</AlertTitle>
</Alert>
<Textarea
rows={4}
onChange={onChange}
defaultValue="Hi team, here are the notes from Tuesday's Designali client kickoff."
aria-label="Draft"
/>
</div>
)
}
alert-45
Loading...
import {
Gift as GiftIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertPromoGradient() {
return (
<Alert className="max-w-md border-primary/20 bg-linear-to-r from-primary/10 via-transparent to-primary/5">
<GiftIcon className="text-foreground" />
<AlertTitle>Get 2 months free</AlertTitle>
<AlertDescription>
Switch to yearly billing before Nov 30 and save 17% on Designali Pro.
</AlertDescription>
<AlertAction>
<Button size="xs">Switch to yearly</Button>
</AlertAction>
</Alert>
)
}
alert-46
Loading...
import {
FileCode as FileCodeIcon,
GitMerge as GitMergeIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const files = ["app/templates/page.tsx", "registry/blocks/pricing.tsx"]
export function AlertMergeConflict() {
return (
<Alert variant="error" className="max-w-md">
<GitMergeIcon />
<AlertTitle>This branch has conflicts that must be resolved</AlertTitle>
<AlertDescription>
<ul className="my-1 space-y-0.5 font-sans text-foreground">
{files.map((file) => (
<li key={file} className="flex items-center gap-1.5">
<FileCodeIcon className="size-3" />
{file}
</li>
))}
</ul>
<div className="mt-2 flex flex-wrap gap-1.5">
<Button size="xs">Resolve in editor</Button>
<Button size="xs" variant="outline">
Use command line
</Button>
</div>
</AlertDescription>
</Alert>
)
}
alert-47
Loading...
"use client"
import * as React from "react"
import {
Check as CheckIcon,
ShieldCheck as ShieldCheckIcon,
Shield as ShieldIcon,
X as XIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { cn } from "@/lib/utils"
const rules = [
{ label: "At least 12 characters", test: (v: string) => v.length >= 12 },
{ label: "One uppercase letter", test: (v: string) => /[A-Z]/.test(v) },
{ label: "One number", test: (v: string) => /\d/.test(v) },
{ label: "One symbol", test: (v: string) => /[^A-Za-z0-9]/.test(v) },
]
export function AlertPasswordRequirements() {
const [value, setValue] = React.useState("designali7")
const passed = rules.filter((rule) => rule.test(value)).length
const ok = passed === rules.length
return (
<div className="w-full max-w-sm space-y-2">
<Label htmlFor="new-password">New password</Label>
<Input
id="new-password"
type="password"
value={value}
onChange={(e) => setValue(e.target.value)}
aria-invalid={!ok}
/>
<Alert variant={ok ? "success" : "default"}>
{ok ? <ShieldCheckIcon /> : <ShieldIcon />}
<AlertTitle>
{ok
? "Strong password"
: passed + " of " + rules.length + " requirements met"}
</AlertTitle>
<AlertDescription>
<ul className="space-y-0.5">
{rules.map((rule) => {
const met = rule.test(value)
return (
<li
key={rule.label}
className={cn(
"flex items-center gap-1.5",
met && "text-foreground"
)}
>
{met ? (
<CheckIcon className="size-3" />
) : (
<XIcon className="size-3" />
)}
{rule.label}
</li>
)
})}
</ul>
</AlertDescription>
</Alert>
</div>
)
}
alert-48
Loading...
import {
TrendingUp as TrendingUpIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const stats = [
{ label: "Control", value: "3.8%" },
{ label: "Variant B", value: "4.6%" },
{ label: "Confidence", value: "97%" },
]
export function AlertExperimentResult() {
return (
<Alert variant="success" className="max-w-md">
<TrendingUpIcon />
<AlertTitle>Variant B is winning: +21% template checkout conversion</AlertTitle>
<AlertDescription>
<div className="my-1.5 grid grid-cols-3 border bg-background">
{stats.map((stat) => (
<div key={stat.label} className="border-e p-2 last:border-0">
<p>{stat.label}</p>
<p className="text-sm font-semibold text-foreground">
{stat.value}
</p>
</div>
))}
</div>
<Button size="xs">Roll out to 100%</Button>
</AlertDescription>
</Alert>
)
}
alert-49
Loading...
import {
RefreshCw as RefreshCwIcon,
Webhook as WebhookIcon,
} from "@designali/icons"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
const attempts = [
{ time: "14:02:11", code: 503 },
{ time: "13:57:09", code: 503 },
{ time: "13:52:04", code: 504 },
]
export function AlertWebhookFailing() {
return (
<Alert variant="error" className="max-w-md">
<WebhookIcon />
<AlertTitle>Endpoint failing for 12 minutes</AlertTitle>
<AlertDescription>
<p className="truncate font-sans">
https://www.designali.com/api/hooks/orders
</p>
<ul className="my-1.5 border bg-background font-sans">
{attempts.map((attempt) => (
<li
key={attempt.time}
className="flex justify-between border-b px-2 py-1 last:border-0"
>
<span>{attempt.time}</span>
<span className="text-destructive">{attempt.code}</span>
</li>
))}
</ul>
<div className="flex gap-1.5">
<Button size="xs" variant="outline">
<RefreshCwIcon data-icon="inline-start" />
Retry now
</Button>
<Button size="xs" variant="ghost">
Disable endpoint
</Button>
</div>
</AlertDescription>
</Alert>
)
}
alert-50
Loading...
import {
LogOut as LogOutIcon,
UserRoundCog as UserRoundCogIcon,
} from "@designali/icons"
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
export function AlertImpersonationBanner() {
return (
<div className="w-full max-w-md border">
<Alert variant="warning" className="border-x-0 border-t-0">
<UserRoundCogIcon />
<AlertTitle>Viewing as a designali.com customer</AlertTitle>
<AlertDescription>
Actions you take are logged and attributed to you.
</AlertDescription>
<AlertAction>
<Button size="xs" variant="outline">
<LogOutIcon data-icon="inline-start" />
Exit
</Button>
</AlertAction>
</Alert>
<div className="space-y-2 p-3">
<div className="h-3 w-1/3 bg-muted" />
<div className="h-16 bg-muted/60" />
<div className="grid grid-cols-2 gap-2">
<div className="h-10 bg-muted/60" />
<div className="h-10 bg-muted/60" />
</div>
</div>
</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