className- Type
string- Default
- -
- Description
- Styles to merge into the wrapper container.
Search for a command to run...
Components / Display
அட்டவணை
Tables display structured data in rows and columns. Use them for comparative data, beneficiary lists, and administrative records.
அட்டவணைகள் வரிசைகள் மற்றும் நெடுவரிசைகளில் கட்டமைக்கப்பட்ட தரவை காட்டுகின்றன.
6 parts documented for implementation and review.
<table>Root wrapper using native HTML <table> for semantic structure and accessibility. Uses a fixed responsive table layout with breakable cell content so narrow viewports do not need horizontal scrolling.
<thead>Header row group containing TableHead cells. Background uses bg-muted/50 for subtle differentiation from data rows. Sticky positioning can be applied for long scrollable tables. Column names should be sentence-case, not uppercase.
<th>Individual column header cell. Uses text-xs font-medium with muted-foreground color. Height is 40px (h-10) with px-4 padding. Right-align numeric columns via text-right. For Tamil headers, apply font-tamil class.
<tbody>/<tr>Data rows container and individual rows. Each row applies hover:bg-muted/50 for scannable highlighting and border-b for row separation. Selected/active rows use data-[state=selected]:bg-muted. Transition duration is kept subtle for performance.
<td>Data cell with px-4 py-2 padding and text-sm sizing. Vertical alignment is middle by default. For Tamil content, add font-tamil font-medium. Use tabular-nums for number columns. Supports inline badges, links, and action buttons.
<caption>Descriptive caption rendered below the table via caption-bottom. Uses text-sm text-muted-foreground. Should describe the data context for accessibility — 'Last 10 scheme applications' or 'கடந்த 10 திட்ட விண்ணப்பங்கள்'.
font-tamil font-medium on TableCell.TableCaption to describe the table for screen reader accessibility.classNamestring| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Styles to merge into the wrapper container. |
Adding scope='col' on TableHead cells lets screen readers associate each column header with its data cells.
scope='col' சேர்ப்பது திரை வாசகர்களுக்கு நெடுவரிசை தலைப்பையும் தரவு கலங்களையும் இணைக்க உதவுகிறது.
For 2 or fewer data rows, a description list or key-value layout is cleaner and more accessible than a full table.
இரண்டு அல்லது குறைவான தரவு வரிசைகளுக்கு முழு அட்டவணை தேவையில்லை — விளக்க பட்டியல் பயன்படுத்தவும்.
Right-aligning numbers makes them easy to compare across rows and matches financial data conventions.
வலதுபுற சேர்க்கை எண்களை வரிசைகளில் ஒப்பிட எளிதாக்குகிறது.
Left-aligned numbers in a column are visually unaligned and make value comparison across rows difficult.
இடதுபுறம் சேர்க்கப்பட்ட எண்கள் காட்சி ரீதியாக ஒழுங்கற்று இருக்கும் மற்றும் ஒப்பிட கடினமாக இருக்கும்.