* feat: toggle group * chore: remove dummy examples * chore: update pathe and typescript, include scripts in tsconfig include * refactor: move import type from normal script to script setup don't know how detypes would react with that normal script
1.4 KiB
1.4 KiB
| title | description | source | primitive |
|---|---|---|---|
| Toggle Group | A set of two-state buttons that can be toggled on or off. | apps/www/src/lib/registry/default/ui/toggle-group | https://www.radix-vue.com/components/toggle-group.html |
Installation
npx shadcn-vue@latest add toggle-group
<template #Manual>
Install the following dependencies:
npm install radix-vue
Copy and paste the following code into your project
<<< @/lib/registry/default/ui/toggle-group/ToggleGroup.vue
Usage
<script setup lang="ts">
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'
</script>
<template>
<ToggleGroup type="single">
<ToggleGroupItem value="a">
A
</ToggleGroupItem>
<ToggleGroupItem value="b">
B
</ToggleGroupItem>
<ToggleGroupItem value="c">
C
</ToggleGroupItem>
</ToggleGroup>
</template>