# Components

> Sosialoka components for React and Vue, installed from the Sosialoka registry with the shadcn CLI.

Sosialoka components are shadcn components with the Sosialoka tokens, radius and status colors built in, for React and Vue.

React components are built on Base UI and installed with `shadcn`; Vue components are built on Reka UI and installed with `shadcn-vue`. Both copy the source into your project, so you own the code.

## Set up a project

Install your product's theme first, then the components you need. The steps for React and Vue are on [Web](https://design.sosialoka.tech/web/#set-up-a-shadcn-project); a single component installs like this:

```bash
npx shadcn@latest add https://design.sosialoka.tech/r/react/button.json
npx shadcn-vue@latest add https://design.sosialoka.tech/r/vue/button.json
```

For Flutter, set up the `sosialoka_ui` package on [Flutter](https://design.sosialoka.tech/flutter/) and copy the code from each component's Flutter tab.

## Components

### Actions

| Component | Use it for |
| --- | --- |
| [Button](https://design.sosialoka.tech/components/button/) | Starting an action. |
| [Dropdown Menu](https://design.sosialoka.tech/components/dropdown-menu/) | Actions behind one button. |
| [Command](https://design.sosialoka.tech/components/command/) | Searching from the keyboard, and the header search card. |

### Forms

| Component | Use it for |
| --- | --- |
| [Input](https://design.sosialoka.tech/components/input/) | One line of text. |
| [Input Group](https://design.sosialoka.tech/components/input-group/) | An input with an icon, text or a button attached, such as search or a password. |
| [Textarea](https://design.sosialoka.tech/components/textarea/) | Several lines of text. |
| [Label](https://design.sosialoka.tech/components/label/) | Naming a form control. |
| [Field](https://design.sosialoka.tech/components/field/) | A label, a hint and the backend's error around one control. |
| [Checkbox](https://design.sosialoka.tech/components/checkbox/) | Turning one option on or off. |
| [Radio Group](https://design.sosialoka.tech/components/radio-group/) | Picking one of a few visible options. |
| [Switch](https://design.sosialoka.tech/components/switch/) | A setting that applies right away. |
| [Slider](https://design.sosialoka.tech/components/slider/) | Picking a value or a range on a track, such as a preview to cut. |
| [Toggle Group](https://design.sosialoka.tech/components/toggle-group/) | Filter chips above a list, such as statuses. |
| [Select](https://design.sosialoka.tech/components/select/) | Picking one value from a short list. |
| [Combobox](https://design.sosialoka.tech/components/combobox/) | Picking from a long list by typing. |
| [Calendar](https://design.sosialoka.tech/components/calendar/) | A month to pick a day from, on the page. |
| [Date Picker](https://design.sosialoka.tech/components/date-picker/) | A date field that opens a calendar. |
| [Input OTP](https://design.sosialoka.tech/components/input-otp/) | A one-time code in six boxes. |
| [File Upload](https://design.sosialoka.tech/components/file-upload/) | Dropping or choosing files, with size and progress. |

### Display

| Component | Use it for |
| --- | --- |
| [Badge](https://design.sosialoka.tech/components/badge/) | Showing a status or a short label. |
| [Alert](https://design.sosialoka.tech/components/alert/) | A message that stays on the page, in a status color. |
| [Card](https://design.sosialoka.tech/components/card/) | Grouping content on its own surface. |
| [Carousel](https://design.sosialoka.tech/components/carousel/) | A row of cards to slide through, such as the latest releases. |
| [Item](https://design.sosialoka.tech/components/item/) | A list row on phones and in panels. |
| [Accordion](https://design.sosialoka.tech/components/accordion/) | Sections that open one at a time. |
| [Separator](https://design.sosialoka.tech/components/separator/) | A thin line between groups. |
| [Avatar](https://design.sosialoka.tech/components/avatar/) | A person or artist as a picture or initials. |
| [Timeline](https://design.sosialoka.tech/components/timeline/) | What happened to a record, newest first. |

### Navigation

| Component | Use it for |
| --- | --- |
| [Tabs](https://design.sosialoka.tech/components/tabs/) | Switching between views of the same content. |
| [Breadcrumb](https://design.sosialoka.tech/components/breadcrumb/) | The path back from a deep page. |
| [Stepper](https://design.sosialoka.tech/components/stepper/) | The steps of a flow and where you are. |
| [Sidebar](https://design.sosialoka.tech/components/sidebar/) | The main navigation of a dashboard. |

### Data

| Component | Use it for |
| --- | --- |
| [Table](https://design.sosialoka.tech/components/table/) | Records in rows and columns, with pagination. |
| [Chart](https://design.sosialoka.tech/components/chart/) | Numbers over time or across categories, with a table of the same numbers. |

### Overlays

| Component | Use it for |
| --- | --- |
| [Dialog](https://design.sosialoka.tech/components/dialog/) | A decision or a short form over the page. |
| [Alert Dialog](https://design.sosialoka.tech/components/alert-dialog/) | Confirming an action that can't be undone. |
| [Sheet](https://design.sosialoka.tech/components/sheet/) | Filters or details in a panel from the edge. |
| [Drawer](https://design.sosialoka.tech/components/drawer/) | A bottom sheet on phones. |
| [Popover](https://design.sosialoka.tech/components/popover/) | Extra content or a short task beside its trigger. |
| [Tooltip](https://design.sosialoka.tech/components/tooltip/) | Naming an icon-only control. |

### Feedback

| Component | Use it for |
| --- | --- |
| [Toast](https://design.sosialoka.tech/components/toast/) | Confirming an action. |
| [Progress](https://design.sosialoka.tech/components/progress/) | How far an upload or import has come. |
| [Spinner](https://design.sosialoka.tech/components/spinner/) | A short wait, or a button that is saving. |
| [Skeleton](https://design.sosialoka.tech/components/skeleton/) | Placeholders while content loads. |

## Supporting items

Some components install smaller Sosialoka items with them: `toggle` comes with Toggle Group, `pagination` with Table, `native-select` with the Vue Calendar (for its month and year pickers), and React components use the `use-mobile` hook. They follow the same tokens, so you can also use them on their own.
