Field

Pair a label, control, and supporting text.

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 { Field } from 'fractalsvelte';
</script>

Usage

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

<Field />

Props

PropTypeDefaultDescription
labelstring-Accessible label for the trigger.
descriptionstring-Supporting text shown beneath the title.
errorstring-Validation message shown below the control.
forstring-id of the control the label points at.
orientation'vertical' | 'horizontal''vertical'Controls the label and control layout.