Collapsible

Reveal optional content in place.

Examples

Installation

Install the package, then import only the components a route uses. Exports are tree-shakable.

Install
pnpm add fractalsvelte
Import
<script lang="ts">
	import { Collapsible } from 'fractalsvelte';
</script>

Usage

Usage
<script lang="ts">
	import { Collapsible } from 'fractalsvelte';
</script>

<Collapsible label="Toggle details">More detail</Collapsible>

Props

PropTypeDefaultDescription
labelstring-Accessible label for the trigger.
openbooleanfalseWhether the surface is open. Supports bind:.
disabledbooleanfalsePrevents interaction while preserving semantic state.