Switch

A bindable binary control.

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

Usage

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

<Switch />

Props

PropTypeDefaultDescription
checkedbooleanfalseThe checked state. Supports bind:.
disabledbooleanfalsePrevents interaction while preserving semantic state.
namestring-The form field name submitted with the value.