BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/nexvyn/table

Table

nexvyn/table
FreeComponent

A composable data table with semantic markup and a per-row hover highlight that dims into the active row.

Live preview

live · rendered by the registry
Rendered by nexvyn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.nexvyn.dev/r/table.json

Source

components/ui/table.tsxui.nexvyn.dev/r/table.json
1'use client'
2
3import {
4 forwardRef,
5 type HTMLAttributes,
6 type TdHTMLAttributes,
7 type ThHTMLAttributes,
8} from 'react'
9import { cn } from '@/lib/utils'
10
11export type TableProps = HTMLAttributes<HTMLTableElement>
12
13export const Table = forwardRef<HTMLTableElement, TableProps>(({ className, ...props }, ref) => (
14 <div className="relative w-full overflow-x-auto">
15 <table ref={ref} className={cn('w-full text-[13px] border-collapse', className)} {...props} />
16 </div>
17))
18Table.displayName = 'Table'
19
20export type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>
21
22export const TableHeader = forwardRef<HTMLTableSectionElement, TableHeaderProps>(
23 ({ className, ...props }, ref) => <thead ref={ref} className={cn(className)} {...props} />,
24)
25TableHeader.displayName = 'TableHeader'
26
27export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>
28
29export const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(
30 ({ className, ...props }, ref) => <tbody ref={ref} className={cn(className)} {...props} />,
31)
32TableBody.displayName = 'TableBody'
33
34export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
35 isBodyRow?: boolean
36}
37
38export const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
39 ({ isBodyRow, className, ...props }, ref) => (
40 <tr
41 ref={ref}
42 className={cn(
43 'group/row border-b border-border/60 transition-colors duration-(--motion-dur-fast) motion-reduce:transition-none',
44 isBodyRow && 'hover:bg-muted',
45 className,
46 )}
47 {...props}
48 />
49 ),
50)
51TableRow.displayName = 'TableRow'
52
53export type TableHeadProps = ThHTMLAttributes<HTMLTableCellElement>
54
55export const TableHead = forwardRef<HTMLTableCellElement, TableHeadProps>(
56 ({ className, ...props }, ref) => (
57 <th
58 ref={ref}
59 scope="col"
60 className={cn('px-3 py-2 text-start font-semibold text-foreground', className)}
61 {...props}
62 />
63 ),
64)
65TableHead.displayName = 'TableHead'
66
67export type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>
68
69export const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
70 ({ className, ...props }, ref) => (
71 <td
72 ref={ref}
73 className={cn(
74 'px-3 py-2 text-start text-muted-foreground transition-colors duration-(--motion-dur-fast) motion-reduce:transition-none group-hover/row:text-foreground',
75 className,
76 )}
77 {...props}
78 />
79 ),
80)
81TableCell.displayName = 'TableCell'
82
83// … truncated

Files it writes

  • components/ui/table.tsx

Facts

Registry
nexvyn
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on nexvyn ui.nexvyn.dev Nexvyn/Nexvyn-ui on GitHub Raw registry item This item as JSON

More from nexvyn

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
BadgebadgenexvynComponentsFree2 deps · 2 files
Bars Themebars-themenexvynComponentsFree1 dep · 3 files
Bounce Sidebarbounce-sidebarnexvynComponentsFree1 dep · 2 files
BreadcrumbsbreadcrumbsnexvynComponentsFree1 dep · 2 files
CheckboxcheckboxnexvynComponentsFree1 dep · 3 files
Clipboard Fieldclipboard-fieldnexvynComponentsFreeno deps · 2 files
Color Pickercolor-pickernexvynComponentsFreeno deps · 16 files
ComboboxcomboboxnexvynComponentsFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex