Components
Next-Admin exports a set of UI components which are, for most of those, extending Radix UI primitives (opens in a new tab). These components are available through the @premieroctet/next-admin/components
import.
Button
The button element accepts all the base button
tag attributes and extends it with the following:
Name | Description | Default Value |
---|---|---|
variant | The button variant. Possible values are `default`, `destructive`, `destructiveOutline`, `outline`, `secondary`, `ghost`, `link` | default |
size | The button size. Possible values are `default`, `sm`, `lg` | - |
icon | A boolean indicating the presence of an icon | - |
asChild | A boolean to render a Radix Slot component (opens in a new tab) | - |
loading | A boolean to render a spinner | - |
BaseInput
The input component rendered in the Form component. It accepts all the base input
tag attributes.
Switch
The Radix Switch (opens in a new tab) component.
Select
The Radix Select (opens in a new tab) component.
Checkbox
An implementation of the Radix Checkbox (opens in a new tab) component. It accepts all the props of the Checkbox Root (opens in a new tab) component, and the following:
Name | Description |
---|---|
indeterminate | A boolean to render the checkbox in an indeterminate state |
Dropdown
The Radix Dropdown (opens in a new tab) component.
Table
The Radix Table (opens in a new tab) component.
Tooltip
The Radix Tooltip (opens in a new tab) component.