Surfaces
Collapsible
A single toggle panel, simpler than Accordion when you only need one.
<script>
import { Collapsible } from "@codeatlasdev/ui";
</script>
<Collapsible title="Details" bind:open>…</Collapsible>
The trigger is a button with aria-expanded. Use Accordion when several related panels should coordinate.
Default (closed)
A surface style is one knob of the theme. It decides whether cards are solid paper, outlined, tonal or blurred, and every component follows it.
Presets remap the brand hue token. Switching preset updates every component that reads from --ca-brand-* without any JS.
Yes. The colorScheme store writes a .dark class to the root element, which flips all dark-mode tokens.
Reference #073 · Pick in the gallery
Code
Open by default
Start expanded and bind `open` to follow the state.
This panel starts open. The user can collapse it.
open = true
Reference #074 · Pick in the gallery
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | – | Trigger label. Required. |
open | boolean | false | Expanded state. Bindable. |
disabled | boolean | false | Prevents toggling. |
onOpenChange | (open: boolean) => void | undefined | Called when the state changes. |
class | string | '' | Extra class names. |
children | Snippet | undefined | Panel content. |