---
title: Components
description: shadcn's components and Sluurp's own, added to your app as source files with one command.
section: Frontend
order: 1
---

# Components

shadcn's components and Sluurp's own, added to your app as source files with one command.

A Sluurp app's components are [shadcn/ui](https://ui.shadcn.com)'s, and Sluurp's own built from them. Both are added as source files in your app, so you can read and change them. To add shadcn's components, do as shadcn's docs say:

```sh title="Terminal"
bunx shadcn add button dialog select
```

Features include:

- Every shadcn component, as source files you own
- Sluurp's own registry: tables, spreadsheets, date pickers, charts, forms, chat, AI panels and more
- The packages each component needs, added to your `package.json`
- Components for plugins, added the same way

## Add Sluurp's components

Sluurp's own come from its registry. Name it once in your app's `components.json`:

```json title="components.json"
{
  "registries": { "@sluurp": "https://sluurp.org/r/{name}.json" }
}
```

Then add them the same way:

```sh title="Terminal"
bunx shadcn add @sluurp/spreadsheet @sluurp/date-picker
```

They land in `components/sluurp/`, the libraries they use in `lib/`, and the packages they need are added to your `package.json`. Import them like your own:

```tsx title="app.tsx"
import { DatePicker } from "@/components/sluurp/date-picker";
```

## What Sluurp's registry has

- **Data:** `smart-table`, `spreadsheet` and `sheet-store`, `records`, `stacked-list`, `pager`, `search-input`, `tag-input`, `complete-input`, `autocomplete`, `number-input`, `scrub-slider`.
- **Dates and time:** `date-picker`, `time-picker`, `month-switcher`, `scheduler`, `time-ago`, `timeline-steps`.
- **Charts:** `chart-basic` (bar, line, area, scatter, pie, radar), `chart-plot` (histogram, box plot, waterfall, candlestick), `chart-field` (heatmap, contour), `chart-hierarchy` (treemap, sunburst, sankey, funnel), `chart-map`, `chart-3d`. See [Charts](/docs/charts).
- **Forms and pages:** `form`, `form-dialog`, `questionnaire`, `settings`, `auth-card`, `markdown`, `code-view`, `heading`, `text`, `description-list`, `fact`, `stat`, `steps`.
- **People and messages:** `chat-panel`, `composer`, `feed`, `notification-bell`, `notification-stack`, `review-panel`.
- **AI:** `agent-sidebar`, `agent-chat`, `agent-ask-field`, `agent-tool-steps`.
- **Look and motion:** `theme-picker`, `palette-editor`, `color-picker`, `emoji-picker`, `picture-picker`, `image`, `lightbox`, `illustration`, `liquid-glass`, `marquee`, `scroll-reveal`, `motion-scenes`, `timeline-view`, and `lib/tween` for animation.
- **Phones:** `swipe-row`, `pull-to-refresh`, `tab-bar`, `sidebar-resizer`.
- **Typography:** `typeset`, a stylesheet for content nobody wrote classes for, with its fonts.
- **PDF:** `pdf`, PDFs made in the browser with pdfmake.

The full list, with every file, is at [sluurp.org/r/registry.json](https://sluurp.org/r/registry.json).

## Plugins' components

A plugin's browser code imports components the same way (`@/components/ui/button`). An app that installs the plugin adds what it uses. For example, the Pages plugin needs its editor's components:

```sh title="Terminal"
bunx shadcn add @sluurp/typeset @sluurp/emoji-picker @sluurp/tip combobox popover skeleton
```

## Try them

Every control below is a registry component, in this page's theme:

<sluurp-island src="kit-showcase" client="visible"></sluurp-island>

Or change one yourself: edit the code, and the result follows.

```tsx try
import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";

export default function Example() {
  const [count, setCount] = useState(0);
  return (
    <div className="flex items-center gap-3">
      <Button onClick={() => setCount((n) => n + 1)}>Add a box</Button>
      <Badge variant="secondary">{count} boxes</Badge>
    </div>
  );
}
```
