# TableCaption **📖 Live documentation:** https://cds.coinbase.com/components/data-display/TableCaption/ Sets an accessible title or caption for Table. ## Import ```tsx import { TableCaption } from '@coinbase/cds-web/tables/TableCaption' ``` ## Examples ### Basic usage ```tsx live Simple Table Caption
``` ### Custom Content ```tsx live Project Team Updated as of March 2024
``` ### Styling Options ```tsx live Quarterly Revenue Report
``` ## Props | Prop | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `align` | `center \| start \| end \| justify` | No | `'start'` | Specify text alignment. Only applicable when children is a string. | | `as` | `HTMLTextTags` | No | `'span'` | A semantic HTML element or a React component to be rendered. Only applicable when children is a string. | | `backgroundColor` | `Color` | No | `-` | Set the background color to a CDS palette background color name. | | `children` | `(string \| ReactElement>) & ReactNode` | No | `-` | The children to render, either as a React element or a string. | | `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 | `-` | Set the text color to a CDS palette foreground color name. | | `innerSpacing` | `CellSpacing` | No | `-` | The spacing to use on the inner content of the caption. Overrides table cell spacing defaults. | | `onChange` | `FormEventHandler` | No | `-` | - | | `outerSpacing` | `CellSpacing` | No | `-` | The spacing to use on the parent wrapper of the caption. Overrides table cell spacing defaults. | | `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 |