Epicenter
Local-first, open source apps
Installation
Install bits-ui:
Copy and paste the following code into your project.
Usage
<script lang="ts">
import * as ToggleGroup from "$lib/components/ui/toggle-group/index.js";
</script> <ToggleGroup.Root type="single">
<ToggleGroup.Item value="a">A</ToggleGroup.Item>
<ToggleGroup.Item value="b">B</ToggleGroup.Item>
<ToggleGroup.Item value="c">C</ToggleGroup.Item>
</ToggleGroup.Root> Outline
Use variant="outline" for an outline style.
Size
Use the size prop to change the size of the toggle group.
Spacing
Use spacing to add spacing between toggle group items.
Vertical
Use orientation="vertical" for vertical toggle groups.
Disabled
Custom
A custom toggle group example.
Use font-normal to set the font
weight.