Table
manifest-ui/tableFreeBlock
Data table with optional single or multi-select modes for chat interfaces.
Install it
npx shadcn@latest add https://ui.manifest.build/r/table.jsonSource
1'use client'23import { Button } from '@/components/ui/button'4import { Input } from '@/components/ui/input'5import {6 Popover,7 PopoverContent,8 PopoverTrigger9} from '@/components/ui/popover'10import {11 Select,12 SelectContent,13 SelectItem,14 SelectTrigger,15 SelectValue16} from '@/components/ui/select'17import { cn } from '@/lib/utils'18import { demoTableColumns, demoTableRows } from './demo/list'19import {20 ArrowDownAZ,21 ArrowUpAZ,22 Check,23 ChevronDown,24 ChevronLeft,25 ChevronRight,26 ChevronUp,27 Copy,28 Download,29 Maximize2,30 Minus,31 RefreshCw,32 Search,33 Share2,34 Trash2,35 Type36} from 'lucide-react'37import { useCallback, useMemo, useState } from 'react'3839// Filter types40interface FilterCondition {41 id: string42 field: string43 operator:44 | 'contains'45 | 'equals'46 | 'startsWith'47 | 'endsWith'48 | 'isEmpty'49 | 'isNotEmpty'50 value: string51}5253/**54 * Configuration for a table column.55 * @interface TableColumn56 * @template T - The row data type57 * @property {string} header - Column header text58 * @property {keyof T | string} accessor - Key to access row data or dot-notation path59 * @property {boolean} [sortable] - Whether the column is sortable60 * @property {string} [width] - CSS width value for the column61 * @property {"left" | "center" | "right"} [align] - Text alignment62 * @property {function} [render] - Custom render function for cell content63 */64export interface TableColumn<T = Record<string, unknown>> {65 header?: string66 accessor?: keyof T | string67 sortable?: boolean68 width?: string69 align?: 'left' | 'center' | 'right'70 render?: (value: unknown, row: T, index: number) => React.ReactNode71}7273/**74 * ═══════════════════════════════════════════════════════════════════════════75 * TableProps76 * ═══════════════════════════════════════════════════════════════════════════77 *78 * Props for configuring a data table component with sorting, selection,79 * pagination, and filtering capabilities.80 *81 * @template T - The row data type82 */83export interface TableProps<T = Record<string, unknown>> {84 data?: {85 /** Column definitions specifying headers, accessors, and rendering. */86 columns?: TableColumn<T>[]87// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Contact Formcontact-form | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files |
