# TableRow **📖 Live documentation:** https://cds.coinbase.com/components/data-display/TableRow/ Defines rows within a Table. ## Import ```tsx import { TableRow } from '@coinbase/cds-web/tables/TableRow' ``` ## Examples ### Basic usage ```tsx live
``` ### Interactive Rows ```tsx live function InteractiveExample() { const handlePress = () => console.log('Row clicked'); return ( Action } /> Action } />
); } ``` ### Full Width Rows ```tsx live Full Width Content Another Full Width Row
``` ### Responsive Spacing ```tsx live function ResponsiveExample() { const responsiveConfig = { phone: { innerSpacing: { spacingHorizontal: 2 }, outerSpacing: { spacingVertical: 1 }, }, desktop: { innerSpacing: { spacingHorizontal: 4 }, outerSpacing: { spacingVertical: 2 }, }, }; return ( Responsive Spacing Row
); } ``` ## Props | Prop | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `backgroundColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `undefined` | Set the background color for this entire row to some CDS Palette background color name | | `children` | `string \| number \| false \| true \| ReactElement> \| Iterable \| ReactPortal \| string & ReactElement> \| string & Iterable \| string & ReactPortal \| number & ReactElement> \| number & Iterable \| number & ReactPortal \| false & ReactElement> \| false & Iterable \| false & ReactPortal \| true & ReactElement> \| true & Iterable \| true & ReactPortal \| ReactElement> & string \| ReactElement> & number \| ReactElement> & false \| ReactElement> & true \| ReactElement> & Iterable \| ReactElement> & ReactPortal \| Iterable & string \| Iterable & number \| Iterable & false \| Iterable & true \| Iterable & ReactElement> \| Iterable & ReactPortal \| ReactPortal & string \| ReactPortal & number \| ReactPortal & false \| ReactPortal & true \| ReactPortal & ReactElement> \| ReactPortal & Iterable` | No | `-` | Children are required, and should always include TableCell \| TableCell[]. | | `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `undefined` | Set the text color for this entire row to some CDS Palette foreground color name | | `disableHoverIndicator` | `boolean` | No | `false` | By default, we set a hover background color of palette.backgroundAlternate on hover for the row. Use this prop to disable this behavior | | `fullWidth` | `boolean` | No | `undefined` | Should this row span the entire width of the table? Useful for treating a row as a Control Strip. | | `innerSpacing` | `CellSpacing` | No | `-` | The spacing to use on the inner content of Cell. Will only take effect when fullWidth is set to true | | `onChange` | `FormEventHandler` | No | `-` | - | | `onClick` | `MouseEventHandler \| (() => void)` | No | `noop` | Callback to fire when pressed | | `outerSpacing` | `CellSpacing` | No | `-` | The spacing to use on the parent wrapper of Cell. Will only take effect when fullWidth is set to true | | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |