Toggle | CombricSkip to content

Toggle

Combric

Pressable tool-state button using aria-pressed.

@combric/react · v1.1.1 · Current

Import and usage

import { Toggle } from "@combric/react";

Load the native stylesheet with @import "@combric/react/css";. This path does not require Tailwind.

Examples

Default toggle

Unpressed state

Disabled state

Public API

Public exports
Name
Toggle
Documented contracts
Property / capabilityPublished contract
Contractpressed/defaultPressed
ContractonPressedChange
Contractnative button props

Accessibility

Uses a native button and exposes pressed state through aria-pressed.

Keyboard

Native Enter and Space activation.

CSS and customization

Combric classes and canonical --combric-* variables provide the package presentation. Consumer className extends the required class; it does not replace the component contract.

Source

View source on GitHub