Collapsible
An interactive section that expands and collapses.
@example starred 3 repositories
@lily/ui
sveltejs/svelte
huntabyte/bits-ui
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Copy the collapsible source from the registry into $lib/components/ui/collapsible.
Usage
<script lang="ts">
import {
Collapsible,
CollapsibleTrigger,
CollapsibleContent
} from '$lib/components/ui/collapsible';
</script>
<Collapsible>
<CollapsibleTrigger>Toggle</CollapsibleTrigger>
<CollapsibleContent>Hidden content</CollapsibleContent>
</Collapsible>