Toggle

A two-state toggle button

Installation

Usage

import { Toggle } from '@/components/ui/toggle'

<Toggle>Bold</Toggle>
<Toggle variant='outline'>Outline</Toggle>
<Toggle defaultPressed>Pressed</Toggle>

Interactivity

This component is SSR-first and works without client JavaScript. Add @kiwa-ui/enhance for interactive behavior like toggling, keyboard navigation, and ARIA state management.

Add to your layout

<script type="module">
  import { toggle } from '@kiwa-ui/enhance'
  toggle()
</script>