leafyGreen UI Kit Split Button
npm install @leafygreen-ui/split-button``shell`
pnpm add @leafygreen-ui/split-button
`shell`
yarn add @leafygreen-ui/split-button
`shell`
npm install @leafygreen-ui/split-button
`js
import { MenuItem, SplitButton } from '@leafygreen-ui/split-button';
menuItems={[
,
,
,
]}
/>;
`
| Prop | Type | Description | Default |
| ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| label | string | The text that will appear inside of the primary button. | |darkMode
| | boolean | Renders the component with dark mode styles. | false |variant
| | 'default' \| 'primary' \| 'danger' | Sets the variant for both Buttons. | 'default' |size
| | 'xsmall' \| 'small' \| 'default' \| 'large' | Sets the size for both buttons. | 'default' |align
| | 'top' \| 'bottom' | Determines the alignment of the menu relative to the component wrapper. | 'bottom' |justify
| | 'start' \| 'end' | Determines the justification of the menu relative to the component wrapper. | 'end' |menuItems
| | Array