Table
muffled-ui-registry/tableFreeComponent
Tabular data with hairline borders and no shadows.
Live preview
live · rendered by the registry
Rendered by muffled-ui-registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.muffled.studio/r/table.jsonSource
1import type * as React from "react";23import { cn } from "@/registry/lib/surface";45function Table({ className, ...props }: React.ComponentProps<"table">) {6 return (7 <div8 data-slot="table-container"9 className="relative w-full overflow-x-auto rounded-md border border-border"10 >11 <table12 data-slot="table"13 className={cn("w-full caption-bottom text-sm", className)}14 {...props}15 />16 </div>17 );18}1920function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {21 return (22 <thead23 data-slot="table-header"24 className={cn("[&_tr]:border-b [&_tr]:border-border", className)}25 {...props}26 />27 );28}2930function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {31 return (32 <tbody33 data-slot="table-body"34 className={cn("[&_tr:last-child]:border-0", className)}35 {...props}36 />37 );38}3940function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {41 return (42 <tfoot43 data-slot="table-footer"44 className={cn(45 "border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",46 className,47 )}48 {...props}49 />50 );51}5253function TableRow({ className, ...props }: React.ComponentProps<"tr">) {54 return (55 <tr56 data-slot="table-row"57 className={cn(58 "border-b border-border transition-colors hover:bg-secondary has-aria-expanded:bg-secondary data-[state=selected]:bg-secondary",59 className,60 )}61 {...props}62 />63 );64}6566function TableHead({ className, ...props }: React.ComponentProps<"th">) {67 return (68 <th69 data-slot="table-head"70 className={cn(71 "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",72 className,73 )}74 {...props}75 />76 );77}7879function TableCell({ className, ...props }: React.ComponentProps<"td">) {80 return (81 <td82 data-slot="table-cell"83 className={cn(84 "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",85 className,86 )}87 {...props}88 />89 );90}9192function TableCaption({93 className,94 ...props95}: React.ComponentProps<"caption">) {96 return (97 <caption98 data-slot="table-caption"99 className={cn("mt-4 text-sm text-muted-foreground", className)}100 {...props}101 />102 );103}104105export {106 Table,107 TableBody,108 TableCaption,109 TableCell,110 TableFooter,111 TableHead,112 TableHeader,113// … truncated
What it pulls in
Other registry items
Files it writes
More from muffled-ui-registry
All 55 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | muffled-ui-registry | Components | Free | 2 deps | |
| Alertalert | muffled-ui-registry | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | muffled-ui-registry | Components | Free | 1 dep | |
| Avataravatar | muffled-ui-registry | Components | Free | 1 dep | |
| Badgebadge | muffled-ui-registry | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | muffled-ui-registry | Components | Free | 2 deps | |
| Buttonbutton | muffled-ui-registry | Components | Free | 2 deps | |
| Button Groupbutton-group | muffled-ui-registry | Components | Free | 2 deps |
