@neo4j-ndl/react
Version:
React implementation of Neo4j Design System
27 lines (22 loc) • 1.8 kB
Markdown
# FilledButton
Import: `import { FilledButton } from '@neo4j-ndl/react'`
## Props
### FilledButton
| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `as` | `("a" & ElementType<any, keyof IntrinsicElements>) \| ("symbol" & ElementType<any, keyof IntrinsicElements>) \| ... 178 more ...` | | | An override of the default HTML tag of the root of the component. Can also be another React component. |
| `children` | `ReactNode` | | | |
| `href` | `string` | | | The URL to link to. Only applies when `as="a"` |
| `isDisabled` | `boolean` | | `false` | If the button is in disabled state |
| `isFloating` | `boolean` | | `false` | If the button is in floating state |
| `isFluid` | `boolean` | | | If the button is fluid, it will take the full width of its container |
| `isLoading` | `boolean` | | `false` | If the button is doing something Async, it will display a loading spinner |
| `leadingVisual` | `ReactNode` | | | Icon to display before the button content |
| `loadingMessage` | `string` | | | Accessible message for screen readers when the button is in a loading state |
| `onClick` | `((e: MouseEvent<HTMLButtonElement, MouseEvent>) => void)` | | | onClick callback |
| `onKeyDown` | `((e: KeyboardEvent<HTMLButtonElement>) => void)` | | | onKeyDown callback |
| `ref` | `any` | | | A ref to apply to the root element. |
| `size` | `'large' \| 'medium' \| 'small'` | | `medium` | Size of button |
| `target` | `HTMLAttributeAnchorTarget` | | | The target window for the link. Only applies when `as="a"`. Not present or required for other element types. |
| `type` | `'button' \| 'reset' \| 'submit'` | | `button` | Type of button |
| `variant` | `'danger' \| 'primary'` | | `primary` | Variant of the button |