Glass Table
einui/glass-tableFreeComponent
A liquid glass styled table for displaying tabular data.
Live preview
live · rendered by the registry
Rendered by einui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.eindev.ir/r/glass-table.jsonSource
1"use client"23import * as React from "react"4import { cn } from "@/lib/utils"56const GlassTable = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(7 ({ className, ...props }, ref) => (8 <div className="relative w-full overflow-auto rounded-2xl border border-white/20 bg-white/5 backdrop-blur-xl shadow-[0_8px_32px_rgba(0,0,0,0.2)]">9 <table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />10 </div>11 ),12)13GlassTable.displayName = "GlassTable"1415const GlassTableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(16 ({ className, ...props }, ref) => (17 <thead ref={ref} className={cn("[&_tr]:border-b border-white/10", className)} {...props} />18 ),19)20GlassTableHeader.displayName = "GlassTableHeader"2122const GlassTableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(23 ({ className, ...props }, ref) => (24 <tbody ref={ref} className={cn("[&_tr:last-child]:border-0", className)} {...props} />25 ),26)27GlassTableBody.displayName = "GlassTableBody"2829const GlassTableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(30 ({ className, ...props }, ref) => (31 <tfoot32 ref={ref}33 className={cn("border-t border-white/10 bg-white/5 font-medium [&>tr]:last:border-b-0", className)}34 {...props}35 />36 ),37)38GlassTableFooter.displayName = "GlassTableFooter"3940const GlassTableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(41 ({ className, ...props }, ref) => (42 <tr43 ref={ref}44 className={cn(45 "border-b border-white/10 transition-colors",46 "hover:bg-white/5 data-[state=selected]:bg-white/10",47 className,48 )}49 {...props}50 />51 ),52)53GlassTableRow.displayName = "GlassTableRow"5455const GlassTableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(56 ({ className, ...props }, ref) => (57 <th58 ref={ref}59 className={cn(60 "h-12 px-4 text-left align-middle font-medium text-white/60",61 "has-[[role=checkbox]]:pr-0",62 className,63 )}64 {...props}65 />66 ),67)68GlassTableHead.displayName = "GlassTableHead"6970const GlassTableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(71 ({ className, ...props }, ref) => (72 <td73 ref={ref}74// … truncated
Files it writes
More from einui
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Base Widgetbase-widget | einui | Components | Free | 1 dep | |
| Calendar Widgetscalendar-widget | einui | Components | Free | 1 dep | |
| Clock Widgetsclock-widget | einui | Components | Free | 1 dep | |
| Glass Alert Dialogglass-alert-dialog | einui | Components | Free | 1 dep | |
| Glass Avatarglass-avatar | einui | Components | Free | 1 dep | |
| Glass Badgeglass-badge | einui | Components | Free | 1 dep | |
| Glass Breadcrumbglass-breadcrumb | einui | Components | Free | 1 dep | |
| Glass Buttonglass-button | einui | Components | Free | 2 deps |
