Alert
crenspire-glass-ui/alertFreeComponent
Displays a callout for user attention with optional glassy variant.
Live preview
live · rendered by the registry
Rendered by crenspire/glass-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glass-ui.crenspire.com/r/alert.jsonSource
1"use client"23import * as React from "react"4import { Alert as BaseAlert, AlertDescription, AlertTitle } from "@/components/ui/alert"5import { cn } from "@/lib/utils"6import { hoverEffects, type HoverEffect } from "@/lib/hover-effects"78export interface AlertProps extends React.ComponentProps<typeof BaseAlert> {9 glow?: boolean10 hover?: HoverEffect11}1213/**14 * Glass UI Alert - Enhanced alert with glassy effects and hover animations15 *16 * @example17 * ```tsx18 * <Alert variant="glass" hover="glow">19 * <AlertTitle>Heads up!</AlertTitle>20 * <AlertDescription>You have new notifications</AlertDescription>21 * </Alert>22 * ```23 */24export const Alert = React.forwardRef<HTMLDivElement, AlertProps>(25 ({ className, variant = "glass", glow = false, hover = "none", ...props }, ref) => {26 return (27 <BaseAlert28 ref={ref}29 variant={variant}30 className={cn(31 "relative overflow-hidden",32 glow && "shadow-lg shadow-purple-500/20",33 "transition-all duration-200",34 hoverEffects({ hover }),35 className36 )}37 {...props}38 />39 )40 }41)42Alert.displayName = "Alert"4344export {45 AlertDescription,46 AlertTitle,47}48
What it pulls in
Other registry items
Files it writes
More from crenspire/glass-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Alert Dialogalert-dialog | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Avataravatar | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Badgebadge | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Breadcrumbbreadcrumb | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Buttonbutton | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Button Groupbutton-group | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Calendarcalendar | crenspire/glass-ui | Components | Free | 3 deps · 5 files |
