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 glass surface uses backdrop-filter blur and a translucent tint to create a layered depth effect that reacts to the content behind 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.
Code
Open by default
Start expanded and bind `open` to follow the state.
This panel starts open. The user can collapse it.
open = true
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. |