Button

Displays a button or a component that looks like a button.

Installation

Variants

All available button variants.

Sizes

Different sizes for the button component.

With Icon

Buttons with icons.

Loading

Buttons in a loading state.

API Reference

Props

PropTypeDefaultDescription
loadingbooleanfalseIf true, shows a spinner and disables the button.
loadingIconReactNodeCustom icon for the loading state.
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link""default"Visual style of the button.
size"default" | "sm" | "lg" | "icon""default"Size of the button.
disabledbooleanDisables interaction.
asChildbooleanfalseIf true, the button will render as its child element.

Input

Displays a form input field or a component that looks like an input field.

Installation

Default

A default input component.

With Label

Input with a label.

With Error

Input with an error message.

Invalid email address

Password

Password input with toggle visibility.

With Icons

Input with start and end icons.

Top Right Element

Input with an element in the top right corner of the label area.

Disabled

Disabled input state.

API Reference

Props

PropTypeDefaultDescription
labelstringLabel for the input field.
errorstring | string[]Error message(s) to display.
iconstring | LucideIconIcon name (from Lucide) or element to show.
iconLeftReactNodeCustom element to show on the left.
iconRightReactNodeCustom element to show on the right.
topRightElementReactNodeElement to show in top right corner.
disabledbooleanDisables interaction.

Data Table

A robust table component for data-heavy applications with server-side pagination, sorting, and searching.

Installation

Basic Usage

A simple table with search and pagination enabled by default.

RoleStatus

No records found.

0-0 of 0

Selectable

Enable row selection and bulk actions.

RoleStatusActions

No records found.

0-0 of 0

Customizing API Parameters

Map internal table parameters to your specific API structure.

This example demonstrates how to handle sorting and pagination when your API uses different parameter names.

API Reference

Props

PropTypeDefaultDescription
fetcherFunctionAsync function that fetches data. Receives query params.
columnsColumn[]Array of column definitions.
searchablebooleantrueShows the search input.
selectablebooleanfalseEnables row selection checkboxes.
selectSize"default" | "sm" | "lg""sm"Size of the rows-per-page selector.
perPageOptionsnumber[][10, 15, 25, 50, 100]Available rows-per-page options.
onSelectionChange(rows: T[]) => voidCallback when row selection changes.
searchPlaceholderstring"Search..."Placeholder for search input.
rightItemsReactNodeElements to show on the right of search bar.
selectableContentReactNodeContent to show when rows are selected.

Column Definition

PropertyTypeDescription
keystringThe data property to display in this column.
headReactNodeThe column header label.
sortablebooleanEnables sorting functionality for this column.
renderFunctionCustom render function: (value, row) => ReactNode

Expected API Response

The fetcher should return a Promise that resolves to an object with the following structure:

{
  "data": [ ...your items ],
  "current_page": 1,
  "last_page": 10,
  "total": 100,
  "from": 1,
  "to": 10
}

Textarea

A multi-line text input field with support for labels, descriptions, and validation states.

Installation

Default

A default textarea component.

With Label

Textarea with a label.

With Error

Textarea with an error message.

Message is too short

Top Right Element

Textarea with an element in the top right corner of the label area.

Max 500 characters

Icons

Textarea with icons on either side.

Disabled

Disabled textarea state.

API Reference

Props

PropTypeDefaultDescription
labelstringLabel for the textarea field.
errorstring | string[]Error message(s) to display.
iconstring | LucideIconIcon name (from Lucide) or element to show.
iconLeftReactNodeCustom element to show on the left.
iconRightReactNodeCustom element to show on the right.
topRightElementReactNodeElement to show in top right corner.
disabledbooleanDisables interaction.

Select

A customizable dropdown list for picking values from a set of options.

Installation

Default Usage

A basic select component with a set of options.

With Label

Select component with an associated label.

With Error

Select component showing an error state.

Please select a valid option

Disabled

Disabled select and disabled options.

Icons

Select with icons in the trigger and individual options.

API Reference

Props

PropTypeDefaultDescription
optionsOption[][]Selection options. Label/Value pairs.
labelstringLabel for the select field.
errorstring | string[]Error message(s) to display.
placeholderstring"Select an option"Placeholder text.
valuestringControlled value of the select.
defaultValuestringInitial value.
onValueChange(val: string) => voidCallback when value changes.
topRightElementReactNodeElement to show in top right corner.

Option Type

interface Option {
  label: string;
  value: string;
  disabled?: boolean;
}

Multi-Select Input

An advanced, searchable select component supporting single and multi-selection, async searching, and item creation.

Installation

Basic Usage

A simple searchable single select.

Multi-Select (Chips)

Select multiple items with visual chip indicators.

12

Multi-Select (Count Only)

A more compact multi-select that only shows the total count.

1 selected

Creatable & Async

Search through an API or add your own custom options.

Search Focused

Hide initial data and force the user to start searching.

API Reference

Props

PropTypeDefaultDescription
labelstringLabel for the input field.
optionsOption[][]Selection options.
valueanyControlled value (string or string[]).
multibooleanfalseEnable multiple selection mode.
creatablebooleanfalseAllow creating items not in options.
showInitialDatabooleanfalseShow options on focus without typing.
showCountOnlybooleanfalseShow selection count instead of chips.
loadingbooleanfalseShow loading state in dropdown.
onSearch(query: string) => voidCallback when search query changes.