A row in a table. Renders <tr> with optional hover and selected shading.
<TableRow isHoverable isSelected={row.id === selectedId}>
<TableCell>web</TableCell>
</TableRow>
Demos
For usage examples, visit the component demo page: Table
Import
import { TableRow } from '@soroush.tech/design-system/Table'Props
| Prop | Type | Default | Description |
|---|---|---|---|
isHoverable | boolean | false | Shades the row on hover with theme.palette[color].light. |
isSelected | boolean | false | Fills the row with theme.palette[color].dark + contrast text. |
color | PaletteColor | 'primary' | Palette color driving the hover/selected shading (theme.palette[color]) - falls back to the enclosing Table's color. |
bg | keyof Theme['background'] | - | Background color. |
as | ElementType | 'tr' | Overrides the root element. |
Also supports styled-system space and border props.
Source code
If this page does not answer your question, have a look at the implementation of the component for more detail.