# 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 | | `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 | `-` | - | | `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 |