# @orochibraru/ui
Svelte 5 components and the theme shared by OpenCount, LocalAssistant, Homerun,
Sergio's, Nuvio Web and Penombre: the shadcn-svelte primitives (vega style) as
these apps customised them, a handful of app-level blocks, and the oklch theme
they all draw from. One package instead of six drifting copies.
Built for SvelteKit 3, Svelte 5 runes and Tailwind CSS v4.
## Install
```bash
bun add -d @orochibraru/ui
```
It goes in `devDependencies`: the app bundles it, so nothing from it is needed
at runtime next to the compiled server.
## Set up the stylesheet
Import the theme right after Tailwind in the app's root stylesheet:
```css
@import "tailwindcss";
@import "@orochibraru/ui/theme.css";
```
The theme brings the design tokens, the `data-*` state variants the primitives
style with, `tw-animate-css`, and an `@source` that makes Tailwind scan the
package, so no other configuration is needed.
## Use
Every primitive is a subpath, with the same exports shadcn-svelte generates:
```svelte
```
Moving an app over is a rewrite of its imports:
`#lib/components/ui/button/index.js` becomes `@orochibraru/ui/button`.
Primitives: accordion, alert, alert-dialog, avatar, badge, breadcrumb, button,
button-group, calendar, card, checkbox, command, context-menu, dialog, drawer,
dropdown-menu, empty, field, input, input-group, input-otp, label, menubar,
pagination, popover, progress, radio-group, range-calendar, resizable,
scroll-area, select, separator, sheet, sidebar, skeleton, slider, sonner,
spinner, switch, table, tabs, textarea, toggle, toggle-group, tooltip.
`input` turns password managers off on fields that don't set `autocomplete`, so
a search box never gets a login suggestion.
## Blocks
Under `@orochibraru/ui/blocks/`:
| Block | What it does |
| --------------------- | ----------------------------------------------------------------------------- |
| `accent-toggle` | The accent presets: swatch strip on desktop, labelled rows on phones. |
| `auth-shell` | Centered sign-in layout: heading, optional `brand` and `footer` snippets. |
| `bottom-nav` | Phone tab bar of top-level destinations, the current one lit. |
| `copy-field` | Monospace value with a copy button and a promise toast. |
| `document-title` | `` from the page title, suffixed with `appName`. |
| `empty-state` | Icon, title, subtitle and an action slot for an empty list. |
| `error-page` | Status, message and error id from `page`, with a link to `homeHref`. |
| `fab` | Floating action button above the phone tab bar, with a haptic tap. |
| `icon-button` | Round icon button with a tooltip that doubles as its accessible name. |
| `install-prompt` | One-time PWA install sheet: native prompt, iOS steps or browser menu steps. |
| `music-player` | Audio bar with a queue: play, skip, seek, volume; positioning is the app's. |
| `nav-cards` | Phone-only list of a section's tabs as cards: icon, label, description. |
| `new-password-fields` | New password and its confirmation: reveal, strength meter, rules. |
| `option-group` | Radio cards for a settings choice, with an icon or a `swatch` snippet each. |
| `otp-field` | One-time code: digits only, SMS autofill, posted as one `code` field. |
| `password-input` | Password field with a button to reveal it. |
| `responsive-sheet` | A dialog on desktop, a bottom drawer under 768px. |
| `setting-switch` | Labelled switch row for settings forms, posting `name=true` when on. |
| `stat-card` | Glass card with an icon, a value and a hint, optionally a link. |
| `tab-nav` | Pill tab bar of links, the current page's tab highlighted. |
| `tab-section` | Layout for a tabbed section: tabs on desktop, nav cards on phones. |
| `theme-picker` | System, light and dark as radio cards, for an appearance page. |
| `theme-toggle` | System, light and dark: icon strip on desktop, three rows on phones. |
| `top-loading-bar` | Progress bar during SvelteKit navigations, safe-area aware. |
| `video-player` | Video with scrubbing, chapters, subtitles, speed, fullscreen, gestures, keys. |
Blocks with built-in copy (`accent-toggle`, `copy-field`, `error-page`,
`install-prompt`, `new-password-fields`, `password-input`, `theme-picker`,
`theme-toggle`) take a `messages` prop. Its keys override the English defaults
one by one, which is how a French or translated app uses them. Blocks never set
the page title, except `tab-section`, which owns its section's title: the app
calls `setPageTitle` itself.
### Tabbed sections
A tabbed page is one real route per tab, each tab with a description, under a
`tab-section` layout. On phones the index route renders `nav-cards` and each tab
is a page titled by its label, its back button returning to the cards. On
desktop the index replaces itself with the first tab and `tab-nav` shows them
all. The tabs live in one list (`SectionTab[]`, exported by `nav-cards`) that
the layout and the index page share.
### Theme
`theme-picker` and `theme-toggle` call `mode-watcher`'s `setMode`, so the app
mounts `` in its root layout. Both take the saved theme as
`value`, so the server-rendered page checks the right one, and call `onchange`
with the new theme for the app to persist. `theme-picker` also posts as a
`theme` radio field (`name` changes it) inside a form.
`icon-button`, and `copy-field` through it, need a `Tooltip.Provider` above
them, which apps put in their root layout.
## Modules
- `@orochibraru/ui/utils`: `cn` and the shadcn-svelte prop helper types.
- `@orochibraru/ui/toast`: `enhanceToast` and `saveToast` narrate a form action
through one promise toast, `toastError` turns anything thrown into a message.
Form updates keep `reset: false` by default so `bind:value` fields survive a
submit.
- `@orochibraru/ui/page-title`: `providePageTitle` once in the root layout,
`setPageTitle` in pages, `usePageTitle` in app bars.
- `@orochibraru/ui/appearance`: `applyAppearance` and `appearanceBootScript`
apply a saved accent, theme, dark variant, font and corner style to ``,
the boot script before first paint.
- `@orochibraru/ui/password`: `passwordRules` and `passwordScore`, the rules a
new password must pass and a 0 to 4 strength, the same on the form and the
server. `new-password-fields` renders them; `ruleLabels` translates them.
- `@orochibraru/ui/haptics`: `haptic("tap" | "success" | "error")`, a no-op
where vibration isn't supported.
## Theming
Colours derive from two variables, so an app usually overrides only these after
importing the theme:
```css
:root {
--hue: 8;
--primary-chroma: 0.15;
}
```
On ``:
- `class="dark"` switches to the dark palette, `data-dark-variant="amoled"`
makes it pure black.
- `data-accent` picks a preset: `bordeaux`, `green`, `blue`, `violet`, `rose`,
`orange`, `amber`, `cyan` or `neutral`.
- `data-font` (`system`, `serif`, `mono`) and `data-corners="square"` change the
type and the radius.
`class="aurora"` on `` adds the drifting gradient background. It is opt-in
so apps with a flat look don't get it.
The theme also defines the `glass`, `glow`, `no-scrollbar` and `tabular`
utilities, the `standalone` variant for installed PWAs, `safe-*` spacing for
notches, the toast styling and the page transitions on phones. Fonts are left to
each app: set `--app-font` and `--display-font`.
## Develop
```bash
bun install
bun run dev
```
The dev server is the docs site: a page per block, primitive and module, with
the component live and the code that renders it. That code is the example file
itself, its `#lib` imports rewritten to the package subpaths, so the two can't
drift apart. A file named `.` next to an example is a companion,
shown after it: the layout, action or page an app needs for what the preview
can't hold. An example without a script is a note for the preview only.
Every component page can be copied as Markdown, viewed as Markdown, exported as
a PDF (through the browser's print dialog, in the light theme), or opened in
Claude or ChatGPT. The list pages filter by category.
The `Dockerfile` deploys the docs site: `bun run build:docs` compiles it to one
Bun binary that serves on port 3000 and reads `x-forwarded-proto` and
`x-forwarded-host`, so llms.txt links point at the public URL behind a proxy.
`bun run check`, `bun run test` and `bun run build` are the gates; `build`
packages `dist/` and runs publint.
New upstream components come from the shadcn-svelte CLI (`components.json` is
set up), followed by `node_modules/.bin/tailwint --fix` on the new files. The
CLI overwrites any customised primitive a new one depends on (drawer, input and
sonner carry the apps' changes): copy those aside before `add --overwrite` and
put them back after.
Dependencies use caret ranges, unlike the apps' exact pins, so a consuming app
dedupes `bits-ui` and friends with its own copy instead of bundling two.
## MCP server
The package ships an MCP server with the docs and every example's code bundled
in, so an editor's assistant can list, search and read the components without
the docs site. It runs over stdio from the package's `bin`:
```bash
claude mcp add orochibraru-ui -- npx -y @orochibraru/ui
```
Cursor, VS Code and other clients take the same command:
```json
{
"mcpServers": {
"orochibraru-ui": { "command": "npx", "args": ["-y", "@orochibraru/ui"] }
}
}
```
Its tools are `get_setup` (this README), `list_components` (by group or
category), `search_components` and `get_component` (the description, import path
and usage code). `bun run build` bundles it with its content, so it needs no
dependency at runtime. The docs site serves the same server over streamable HTTP
at `/mcp`, plus `/llms.txt`, `/llms-full.txt` and a Markdown page per component
at `//.md`.
---
# Accent toggle
> The accent presets: a swatch strip on desktop, labelled rows on phones.
Category: Appearance. Import from `@orochibraru/ui/blocks/accent-toggle`.
## Usage
### Example.svelte
```svelte
toast(`Accent: ${accent}.`)} />
```
---
# Auth shell
> Centered sign-in layout: heading, optional brand and footer.
Category: Layout. Import from `@orochibraru/ui/blocks/auth-shell`.
## Usage
### Example.svelte
```svelte
{#snippet brand()}
{/snippet}
{#snippet footer()}
No account? Ask your admin.
{/snippet}
```
---
# Bottom nav
> The phone tab bar: top-level destinations, the current one lit.
Category: Navigation. Import from `@orochibraru/ui/blocks/bottom-nav`.
## Usage
### +layout.svelte
```svelte
{@render children()}
```
---
# Copy field
> Monospace value with a copy button and a promise toast.
Category: Forms. Import from `@orochibraru/ui/blocks/copy-field`.
## Usage
### Example.svelte
```svelte
```
---
# Document title
> The tab's from the page title, suffixed with the app.
Category: Layout. Import from `@orochibraru/ui/blocks/document-title`.
## Usage
### +layout.svelte
```svelte
{@render children()}
```
---
# Empty state
> Icon, title, subtitle and an action for an empty list.
Category: Feedback. Import from `@orochibraru/ui/blocks/empty-state`.
## Usage
### Example.svelte
```svelte
```
---
# Error page
> Status, message and error id, with a link back home.
Category: Layout. Import from `@orochibraru/ui/blocks/error-page`.
## Usage
### +error.svelte
```svelte
```
---
# Fab
> Floating action button above the phone tab bar, with a haptic tap.
Category: Actions. Import from `@orochibraru/ui/blocks/fab`.
## Usage
### Example.svelte
```svelte
Phones only: narrow the window and it floats bottom right, above the tab bar.
On desktop the same action is a primary button in the page header.
toast("Fab tapped.")} />
```
---
# Icon button
> Round icon button whose tooltip is its accessible name.
Category: Actions. Import from `@orochibraru/ui/blocks/icon-button`.
## Usage
### Example.svelte
```svelte
```
---
# Install prompt
> One-time PWA install sheet: native prompt or the steps.
Category: Overlays. Import from `@orochibraru/ui/blocks/install-prompt`.
## Usage
### +layout.svelte
```svelte
{@render children()}
{#snippet brand()}
{/snippet}
```
---
# Music player
> An audio player bar with a queue: play, skip, seek and volume.
Category: Media. Import from `@orochibraru/ui/blocks/music-player`.
## Usage
### Example.svelte
```svelte
It renders in flow, as wide as its container: wrap it in a fixed bar to dock
it at the bottom of the screen. Tracks by Kevin MacLeod, CC BY 3.0, from
Wikimedia Commons.
```
---
# Nav cards
> Phone-only list of a section's tabs as cards.
Category: Navigation. Import from `@orochibraru/ui/blocks/nav-cards`.
## Usage
### Example.svelte
```svelte
Phones only: narrow the window to see the cards. On desktop the section shows
its tabs instead.
```
---
# New password fields
> New password with a reveal button, a strength meter and the rules it must pass.
Category: Forms. Import from `@orochibraru/ui/blocks/new-password-fields`.
## Usage
### Example.svelte
```svelte
```
### +page.server.ts
```ts
import { type Actions, fail } from "@sveltejs/kit";
import { passwordRules } from "@orochibraru/ui/password";
export const actions = {
default: async ({ request }) => {
const form = await request.formData();
const password = String(form.get("password") ?? "");
const failed = passwordRules(
password,
String(form.get("email") ?? ""),
).filter((rule) => !rule.passed);
if (failed.length > 0) {
return fail(400, {
errors: { password: failed.map((rule) => rule.label) },
});
}
if (form.get("confirmPassword") !== password) {
return fail(400, {
errors: { confirmPassword: ["The passwords don't match."] },
});
}
return { saved: true };
},
} satisfies Actions;
```
---
# Option group
> Radio cards for a settings choice, each with an icon or swatch.
Category: Forms. Import from `@orochibraru/ui/blocks/option-group`.
## Usage
### Example.svelte
```svelte
```
---
# Otp field
> A one-time code: digits only, autofilled from SMS, posted as one field.
Category: Forms. Import from `@orochibraru/ui/blocks/otp-field`.
## Usage
### Example.svelte
```svelte
Code from your authenticator app toast(`Verifying ${code}.`)} />
```
---
# Password input
> A password field with a button to reveal what was typed.
Category: Forms. Import from `@orochibraru/ui/blocks/password-input`.
## Usage
### Example.svelte
```svelte
Password
```
---
# Responsive sheet
> A dialog on desktop, a bottom drawer on phones.
Category: Overlays. Import from `@orochibraru/ui/blocks/responsive-sheet`.
## Usage
### Example.svelte
```svelte
Resize the window to see it switch.
```
---
# Setting switch
> Labelled switch row for settings forms.
Category: Forms. Import from `@orochibraru/ui/blocks/setting-switch`.
## Usage
### Example.svelte
```svelte
```
---
# Stat card
> Glass card with an icon, a value and a hint, optionally a link.
Category: Display. Import from `@orochibraru/ui/blocks/stat-card`.
## Usage
### Example.svelte
```svelte
```
---
# Tab nav
> Pill tab bar of links, the current page's tab highlighted.
Category: Navigation. Import from `@orochibraru/ui/blocks/tab-nav`.
## Usage
### Example.svelte
```svelte
```
---
# Tab section
> Tabbed section layout: tabs on desktop, nav cards on phones.
Category: Navigation. Import from `@orochibraru/ui/blocks/tab-section`.
## Usage
### section/+layout.svelte
```svelte
{@render children()}
```
### section/+page.svelte
```svelte
```
### section/appearance/+page.svelte
```svelte
```
### section/profile/+page.svelte
```svelte
NameEmail
```
### section/tabs.ts
```ts
import { resolve } from "$app/paths";
import PaletteIcon from "@lucide/svelte/icons/palette";
import UserRoundIcon from "@lucide/svelte/icons/user-round";
import type { SectionTab } from "@orochibraru/ui/blocks/nav-cards";
export const tabs: SectionTab[] = [
{
href: resolve("/section/profile"),
label: "Profile",
description: "Your name and the email you sign in with.",
icon: UserRoundIcon,
},
{
href: resolve("/section/appearance"),
label: "Appearance",
description: "Light, dark, or whatever the device says.",
icon: PaletteIcon,
},
];
```
---
# Theme picker
> System, light and dark as radio cards.
Category: Appearance. Import from `@orochibraru/ui/blocks/theme-picker`.
## Usage
### Example.svelte
```svelte
toast(`Theme: ${theme}.`)} />
```
---
# Theme toggle
> System, light and dark: an icon strip on desktop, three rows on phones.
Category: Appearance. Import from `@orochibraru/ui/blocks/theme-toggle`.
## Usage
### Example.svelte
```svelte
```
---
# Top loading bar
> Progress bar during SvelteKit navigations.
Category: Feedback. Import from `@orochibraru/ui/blocks/top-loading-bar`.
## Usage
### +layout.svelte
```svelte
{@render children()}
```
---
# Video player
> A video player: scrubbing, chapters, subtitles, speed, fullscreen, gestures and shortcuts.
Category: Media. Import from `@orochibraru/ui/blocks/video-player`.
## Usage
### Example.svelte
```svelte
```
---
# Accordion
> Stacked sections that expand one or several at a time.
Category: Display. Import from `@orochibraru/ui/accordion`.
## Usage
### Example.svelte
```svelte
How do I invite team members?
Open the project settings and send an invite by email. They join with the
role you pick.
Can I export my documents?
Yes. Every document exports to PDF or Markdown from its menu.
What happens when I delete a project?
It stays in the trash for 30 days, then it is gone for good with all its
files.
```
---
# Alert
> A callout for something the reader should notice.
Category: Feedback. Import from `@orochibraru/ui/alert`.
## Usage
### Example.svelte
```svelte
Sync runs every hour
Changes made on your other devices show up within the hour.
Upload failed
report.pdf is larger than the 25 MB limit.
```
---
# Alert dialog
> A modal that asks to confirm before something drastic.
Category: Overlays. Import from `@orochibraru/ui/alert-dialog`.
## Usage
### Example.svelte
```svelte
{#snippet child({ props })}
{/snippet}
Delete "Website redesign"?
The project and its 48 files are deleted for every member. This can't be
undone.
Cancel toast.success("Project deleted.")}
>
Delete
```
---
# Avatar
> A user's picture, falling back to initials.
Category: Display. Import from `@orochibraru/ui/avatar`.
## Usage
### Example.svelte
```svelte
AMSCNBALSMJD+4
```
---
# Badge
> A small label for a status or a count.
Category: Display. Import from `@orochibraru/ui/badge`.
## Usage
### Example.svelte
```svelte
ActivePendingArchivedOverdue Completed3 new messages
```
---
# Breadcrumb
> The path from the root to the current page.
Category: Navigation. Import from `@orochibraru/ui/breadcrumb`.
## Usage
### Example.svelte
```svelte
GroupsLisbon tripDinner at Ramiro
```
---
# Button
> Every button variant and size.
Category: Actions. Import from `@orochibraru/ui/button`.
## Usage
### Example.svelte
```svelte
```
---
# Button group
> Buttons joined into one control.
Category: Actions. Import from `@orochibraru/ui/button-group`.
## Usage
### Example.svelte
```svelte
October 2026https://
```
---
# Calendar
> A month grid to pick a date.
Category: Forms. Import from `@orochibraru/ui/calendar`.
## Usage
### Example.svelte
```svelte
Due on {dueDate?.toDate(getLocalTimeZone()).toLocaleDateString() ?? "—"}
```
---
# Card
> A surface with a header, content and footer.
Category: Display. Import from `@orochibraru/ui/card`.
## Usage
### Example.svelte
```svelte
Website redesign4 members · 48 files
12 of 20 tasks
Due in 5 days
Quarterly reportEdited 12 minutes ago
Shared with 3 team members.
```
---
# Checkbox
> A checkbox, with a label through Field.
Category: Forms. Import from `@orochibraru/ui/checkbox`.
## Usage
### Example.svelte
```svelte
Email me when someone commentsWeekly digestA summary of activity every Monday.Share with everyoneInclude archived projects
```
---
# Command
> A searchable list of commands, also as a palette.
Category: Overlays. Import from `@orochibraru/ui/command`.
## Usage
### Example.svelte
```svelte
No results. Website redesign Mobile app Quarterly report Meeting notesNo results. (open = false)}>
New document
⌘N (open = false)}>
Schedule a meeting
(open = false)}>
Settings
⌘,
```
---
# Context menu
> A menu on right click or long press.
Category: Overlays. Import from `@orochibraru/ui/context-menu`.
## Usage
### Example.svelte
```svelte
Right-click (or long-press) the file list
Edit
⌘E DuplicateMove to projectWebsite redesignMobile app
Show archived
Sort byDateName Delete
```
---
# Dialog
> A modal window over the page.
Category: Overlays. Import from `@orochibraru/ui/dialog`.
## Usage
### Example.svelte
```svelte
{#snippet child({ props })}
{/snippet}
```
---
# Drawer
> A panel sliding up from the bottom, made for phones.
Category: Overlays. Import from `@orochibraru/ui/drawer`.
## Usage
### Example.svelte
```svelte
{#snippet child({ props })}
{/snippet}
Manage accessWebsite redesign · 3 members
{#each members as member (member.name)}
{member.name}{member.role}
{/each}
{#snippet child({ props })}
{/snippet}
```
---
# Dropdown menu
> A menu opened from a button.
Category: Overlays. Import from `@orochibraru/ui/dropdown-menu`.
## Usage
### Example.svelte
```svelte
{#snippet child({ props })}
{/snippet}
Project Edit
⌘E Share
Notifications
VisibilityPrivateTeam Delete
```
---
# Empty
> The parts of an empty state, to compose your own.
Category: Feedback. Import from `@orochibraru/ui/empty`.
## Usage
### Example.svelte
```svelte
No documents yet
Create the first document of this project to get started.
```
---
# Field
> Label, control, description and error, laid out together.
Category: Forms. Import from `@orochibraru/ui/field`.
## Usage
### Example.svelte
```svelte
New taskVisible to everyone in the project.TitleEstimate
{#if invalid}
The estimate must be greater than zero.
{:else}
In hours.
{/if}
Repeat every week
```
---
# Input
> A text input; password managers stay off unless asked.
Category: Forms. Import from `@orochibraru/ui/input`.
## Usage
### Example.svelte
```svelte
```
---
# Input group
> An input with addons: icons, text or buttons.
Category: Forms. Import from `@orochibraru/ui/input-group`.
## Usage
### Example.svelte
```svelte
MB
```
---
# Input otp
> One box per digit for a one-time code.
Category: Forms. Import from `@orochibraru/ui/input-otp`.
## Usage
### Example.svelte
```svelte
{#snippet children({ cells })}
{#each cells.slice(0, 3) as cell (cell)}
{/each}
{#each cells.slice(3, 6) as cell (cell)}
{/each}
{/snippet}
{code.length === 6
? `Verifying ${code}…`
: "Enter the code we emailed you."}
```
---
# Label
> A label for a form control.
Category: Forms. Import from `@orochibraru/ui/label`.
## Usage
### Example.svelte
```svelte
```
---
# Menubar
> A desktop-style bar of menus.
Category: Navigation. Import from `@orochibraru/ui/menubar`.
## Usage
### Example.svelte
```svelte
FileNew file ⌘NDuplicate ⌘DExportPDFMarkdownDeleteView
Show hidden files
Sort byNameDate modifiedSize
```
---
# Pagination
> Links to the pages of a long list.
Category: Navigation. Import from `@orochibraru/ui/pagination`.
## Usage
### Example.svelte
```svelte
{#snippet children({ pages, currentPage })}
{#each pages as p (p.key)}
{#if p.type === "ellipsis"}
{:else}
{/if}
{/each}
{/snippet}
```
---
# Popover
> Floating content anchored to a trigger.
Category: Overlays. Import from `@orochibraru/ui/popover`.
## Usage
### Example.svelte
```svelte
Set storage limit
Storage limit
We'll warn the team when the workspace gets close.
```
---
# Progress
> How far along something is.
Category: Feedback. Import from `@orochibraru/ui/progress`.
## Usage
### Example.svelte
```svelte
Storage{used} GB of {total} GB
```
---
# Radio group
> Pick one of a few options.
Category: Forms. Import from `@orochibraru/ui/radio-group`.
## Usage
### Example.svelte
```svelte
Selected: {notify}
```
---
# Range calendar
> A month grid to pick a start and an end date.
Category: Forms. Import from `@orochibraru/ui/range-calendar`.
## Usage
### Example.svelte
```svelte
```
---
# Resizable
> Panes split by a draggable handle.
Category: Layout. Import from `@orochibraru/ui/resizable`.
## Usage
### Example.svelte
```svelte
Services
Details
Logs
```
---
# Scroll area
> A scrolling box with a styled scrollbar.
Category: Layout. Import from `@orochibraru/ui/scroll-area`.
## Usage
### Example.svelte
```svelte
Files
{#each files as file (file.id)}
{file.name}{file.size} KB
{/each}
```
---
# Select
> Pick one option from a list.
Category: Forms. Import from `@orochibraru/ui/select`.
## Usage
### Example.svelte
```svelte
{label}Roles
{#each roles as r (r.value)}
{r.label}
{/each}
```
---
# Separator
> A line between groups of content.
Category: Layout. Import from `@orochibraru/ui/separator`.
## Usage
### Example.svelte
```svelte
```
---
# Sheet
> A panel sliding in from a side of the screen.
Category: Overlays. Import from `@orochibraru/ui/sheet`.
## Usage
### Example.svelte
```svelte
{#snippet child({ props })}
{/snippet}
Edit profileChanges are visible to your team.NameEmail
{#snippet child({ props })}
{/snippet}
```
---
# Sidebar
> The app sidebar: groups, menus, collapsing to icons.
Category: Navigation. Import from `@orochibraru/ui/sidebar`.
## Usage
### Example.svelte
```svelte
```
---
# Skeleton
> Placeholder shapes while content loads.
Category: Feedback. Import from `@orochibraru/ui/skeleton`.
## Usage
### Example.svelte
```svelte
{#each [1, 2, 3] as row (row)}
{/each}
```
---
# Slider
> Pick a value or a range by dragging.
Category: Forms. Import from `@orochibraru/ui/slider`.
## Usage
### Example.svelte
```svelte
Storage limit{limit} GB
File size between{range[0]} MB and {range[1]} MB
```
---
# Sonner
> Toasts, styled by the theme.
Category: Feedback. Import from `@orochibraru/ui/sonner`.
## Usage
### Example.svelte
```svelte
```
---
# Spinner
> An indeterminate loading indicator.
Category: Feedback. Import from `@orochibraru/ui/spinner`.
## Usage
### Example.svelte
```svelte
Syncing accounts
```
---
# Switch
> An on or off toggle.
Category: Forms. Import from `@orochibraru/ui/switch`.
## Usage
### Example.svelte
```svelte
```
---
# Table
> Rows and columns of data.
Category: Display. Import from `@orochibraru/ui/table`.
## Usage
### Example.svelte
```svelte
Shared files, updated in March.FileOwnerModifiedSize
{#each files as file (file.id)}
{file.name}{file.owner}{file.date}
{file.size.toFixed(1)} MB
{/each}
Total{total.toFixed(1)} MB
```
---
# Tabs
> In-page tabs that switch panels without navigating.
Category: Navigation. Import from `@orochibraru/ui/tabs`.
## Usage
### Example.svelte
```svelte
ProjectsActivityMembers
12 projects, 4 archived.
Sam commented on the roadmap.
Alex, Sam, Lou and you.
This weekThis monthThis year
```
---
# Textarea
> A multi-line text input.
Category: Forms. Import from `@orochibraru/ui/textarea`.
## Usage
### Example.svelte
```svelte
Message{message.length} / 200 charactersArchived message
```
---
# Toggle
> A button that stays pressed.
Category: Actions. Import from `@orochibraru/ui/toggle`.
## Usage
### Example.svelte
```svelte
Mute
Recurring onlyUnpaidArchived
```
---
# Toggle group
> Toggles where one or several stay pressed.
Category: Actions. Import from `@orochibraru/ui/toggle-group`.
## Usage
### Example.svelte
```svelte
PaidPendingOverdue
```
---
# Tooltip
> A hint on hover or focus.
Category: Overlays. Import from `@orochibraru/ui/tooltip`.
## Usage
### Example.svelte
```svelte
```
---
# Appearance
> Apply a saved accent, theme, font and corners to .
Category: Appearance. Import from `@orochibraru/ui/appearance`.
## Usage
### Example.svelte
```svelte
```
### +layout.svelte
```svelte
{@html appearanceBootScript(data.appearance)}
{@render children()}
```
---
# Haptics
> A short vibration on tap, success or error.
Category: Feedback. Import from `@orochibraru/ui/haptics`.
## Usage
### Example.svelte
```svelte
```
---
# Page title
> One page title for the app bar, the header and the tab.
Category: Layout. Import from `@orochibraru/ui/page-title`.
## Usage
### Example.svelte
```svelte
This page set its title to {title.current} and its back
button to {title.backHref}. The phone app bar, the desktop header
and the browser tab all read it.
```
---
# Password
> The password rules and strength score, for the form and the server alike.
Category: Forms. Import from `@orochibraru/ui/password`.
## Usage
### Example.svelte
```svelte
Score: {score} / 4
{#each rules as rule (rule.id)}
{rule.passed ? "✓" : "✗"}
{rule.label}
{/each}
```
---
# Toast
> Narrate a form action through one promise toast.
Category: Feedback. Import from `@orochibraru/ui/toast`.
## Usage
### Example.svelte
```svelte
```
### +page.server.ts
```ts
import { type Actions, fail } from "@sveltejs/kit";
export const actions = {
save: async ({ request }) => {
const form = await request.formData();
if (!String(form.get("name") ?? "").trim()) {
return fail(400, { error: "Name is required." });
}
return { saved: true };
},
} satisfies Actions;
```
---
# Utils
> cn to merge Tailwind classes, and the prop helper types.
Category: Utilities. Import from `@orochibraru/ui/utils`.
## Usage
### Example.svelte
```svelte
```