Button

The Button component is used to display a small popup that appears when a user interacts with a trigger element.

Imports

`Button` - The actual button component, it's also exported as default.

Installation

npx neel-ui add button

Variants

Disabled

Disable the button by setting `disabled` to `true`.

Loading

Set the `loading` property to true to display the `Spinner` component beside the button.

Custom Spinner

Set the `spinner` property to a custom component to display a custom spinner beside the button.

Link

Add an `href` property to the button to make it a link.

API Reference

Props of the `Button` component. `*` denotes the default value.

Attribute
Type
Description
Parent
variant
`string`
The variant of the button.
`Button`
size
`string`
The size of the button.
`Button`
loading
`boolean`
If the button is loading.
`Button`
disabled
`boolean`
If the button is disabled.
`Button`
spinner
`Component`
The spinner component to display.
`Button`
href
`string`
The href of the button.
`Button`