# CodeAtlas UI: full documentation
> Open-source Svelte 5 component library (`@codeatlasdev/ui`). Index: https://ui.codeatlas.com.br/llms.txt
---
# Introduction
Group: Getting started. URL: https://ui.codeatlas.com.br/docs/
CodeAtlas UI is an open-source Svelte 5 component library with a sober solid default, opt-in glass materials, an OKLCH theme engine and native-feeling mobile behavior.
CodeAtlas UI gives Svelte 5 apps full screens, not just bricks: page templates, an app shell, data tables, charts, forms and overlays, all built on a headless layer of our own and themed through CSS custom properties.
```svelte
{#snippet children(list)}
{#each list.rows as u (u.id)}
|
{/each}
{/snippet}
```
That is a whole users page: header, search, pagination and empty state, with no CSS written.
## What you get
- Page templates instead of primitives: `AppList`, `AppForm`, `AppSettings`, `PageShell` and `AppShellLayout` bring layout, spacing and empty states.
- Sober by default, glass on request: surfaces are solid and opaque out of the box. The `liquid` recipe (or `defaultStyle: "glass"`) brings back Liquid Glass, with five material tiers over a real `backdrop-filter` and opaque fallbacks for reduced transparency.
- A theme engine with eight OKLCH presets, brand presets from one hex color, nine surface styles, fifteen design-style recipes and no flash on load.
- Native feel on mobile: safe areas, keyboard handling, 44px touch targets, bottom sheets with swipe to dismiss and a browser chrome color that follows the page.
- Accessibility: WAI-ARIA keyboard and focus behavior, axe-tested components, reduced motion and reduced transparency support.
- Small bundles: Charts, DataTable and CodeSnippet are separate entry points with optional peers, so they stay out of your bundle unless imported.
- Agent-ready: closed prop vocabularies, typed props, an MCP server, `llms.txt` and installable skills.
## Install
## Start here
## Explore
---
# Installation
Group: Getting started. URL: https://ui.codeatlas.com.br/docs/getting-started/installation/
Install @codeatlasdev/ui and wire the theme into SvelteKit, Astro or plain Vite without a flash of the wrong theme.
CodeAtlas UI needs Svelte 5 (runes mode). In a SvelteKit or Astro app, `bunx @codeatlasdev/ui init` does the whole setup below for you (see [The `init` command](#the-init-command)). Setup is three things: import the stylesheet once, inject the theme script before first paint, and start the `colorScheme` store in your root layout.
The core bundle stays small. Heavy features are separate entry points with optional peer dependencies, so install only what you use:
| Feature | Import from | Also install |
|---|---|---|
| Charts | `@codeatlasdev/ui/charts` | `echarts` |
| DataTable | `@codeatlasdev/ui/table` | `@tanstack/svelte-table` |
| CodeSnippet | `@codeatlasdev/ui/code` | `shiki` |
| Masked and money fields | `@codeatlasdev/ui/forms` | nothing |
| Accessibility test helpers | `@codeatlasdev/ui/testing` | `axe-core` |
| Brand icons (`caBrandPlugin`) | `@codeatlasdev/ui/vite` | `@resvg/resvg-js` and `png-to-ico` |
| `migrate` command | `bunx @codeatlasdev/ui migrate` | `typescript` |
`@sveltejs/kit` and `astro` are optional peers too: install the one your app uses. Icons come from `@lucide/svelte`, which the package already depends on.
### Release channels
Releases are published by version tag (`@codeatlasdev/ui@X.Y.Z`), not from branches. The prerelease id in the version is the npm dist-tag.
| Version | Install | When to use it |
|---|---|---|
| `X.Y.Z` | `bun add @codeatlasdev/ui` (dist-tag `latest`) | Production. Semver: breaking changes only in a major. |
| `X.Y.Z-beta.N` | `bun add @codeatlasdev/ui@beta` | A prerelease of the next version. It never moves `latest`. Try it before it ships. |
A prerelease with another id (`X.Y.Z-alpha.N`, for example) is published under a dist-tag with that id. Pin an exact version (`bun add @codeatlasdev/ui@3.1.0-beta.2`) to keep a prerelease stable.
Every version is published from CI with an npm provenance statement, so you can check which commit and workflow built it (`npm audit signatures`).
## The `init` command
```sh
bunx @codeatlasdev/ui init [--write] [--dir ]
```
`init` detects the framework from `package.json` (`@sveltejs/kit` means SvelteKit, otherwise `astro` means Astro) and prints `Detected SvelteKit.` or `Detected Astro.`. With neither it prints an error and exits with code 1. Then it goes through the files of that framework, one line each:
| Line | Meaning |
|---|---|
| `create ` | The file was missing and is now written. |
| `ok (already set up)` | Nothing to change. Running `init` again on a finished setup prints only `ok` lines. |
| `diff (exists, not modified)` | The file exists and needs a change. A unified diff follows; nothing is written until you re-run with `--write`. |
| `patch ` | The change was applied (`--write`). |
| `manual : could not patch safely.` | `init` could not edit the file safely (no `plugins: [...]` array, an existing `handle` of your own, no `