Usage
Tabs components can be imported via the tabs
entrypoint in the @ag.ds-next/react
package.
For example:
import { ... } from '@ag.ds-next/react/tabs';
Props
Tabs PropsProp | Type | Description |
---|
activeIndex? | number | The index of the active tab. |
background? | "body" | "bodyAlt"Default: "body" | If this component is placed on a page with a `bodyAlt` background, set this to `bodyAlt`. |
children? | ReactNode | |
contained? | booleanDefault: "true" | If `false`, the horizontal padding and borders will be removed. |
onChange? | ((activeIndex: number) => void) | Function to be called when the active tab index is changed. |
TabList PropsProp | Type | Description |
---|
children? | ReactNode | |
TabButton PropsProp | Type | Description |
---|
children? | ReactNode | |
endElement? | ReactNode | |
TabPanels PropsProp | Type | Description |
---|
children? | ReactNode | |
TabPanel PropsProp | Type | Description |
---|
children? | ReactNode | |
Source
You can view the full source code for this package on Github.