Collapsible

An interactive component which expands and collapses a panel.

Loading preview…

Installation

Usage

Use collapsible for a single expandable section. Bind open on the root, and compose with Collapsible.Trigger and Collapsible.Content.

1<script lang="ts">
2	import * as Collapsible from '~/components/collapsible';
3</script>
4
5<Collapsible.Root>
6	<Collapsible.Trigger>Can I use this in my project?</Collapsible.Trigger>
7	<Collapsible.Content>
8		Yes. Free to use for personal and commercial projects. No attribution required.
9	</Collapsible.Content>
10</Collapsible.Root>