Components
Toggle
Toggle, dressed in the paper-and-ink system: a standalone seal that settles into the flat ink fill while pressed on. The parts — Root, Indicator.
#Basic usage
<script setup lang="ts">
import { Toggle } from "@bysages/vue";
</script>
<template>
<Toggle.Root aria-label="Toggle bold">
<Toggle.Indicator>B</Toggle.Indicator>
</Toggle.Root>
<Toggle.Root :default-pressed="true" aria-label="Toggle italic">
<Toggle.Indicator>I</Toggle.Indicator>
</Toggle.Root>
</template>
#Props
#Indicator
A styled part — no props of its own; it takes the anatomy's shared styling.
#Root
| Prop | Type | Default | Description |
|---|---|---|---|
defaultPressed | boolean | The default pressed state of the toggle. | |
disabled | boolean | Whether the toggle is disabled. | |
pressed | boolean | The pressed state of the toggle. |