Toggle
Category: Actions & Buttons
Binary toggle switch for instant setting changes.
Basic Usage
Use <Toggle /> directly within your .kiw page or layout templates:
<Toggle class="my-custom-toggle">
<!-- Slot content or properties -->
</Toggle>
Supported Props
activeIcon: Configures theactiveIconattribute or behavior.disabled: Configures thedisabledattribute or behavior.id: Configures theidattribute or behavior.inactiveIcon: Configures theinactiveIconattribute or behavior.label: Configures thelabelattribute or behavior.onClick: Configures theonClickattribute or behavior.pressed: Configures thepressedattribute or behavior.size: Configures thesizeattribute or behavior.text: Configures thetextattribute or behavior.variant: Configures thevariantattribute or behavior.
class: Additional custom CSS classes to append to the component root.
Visual Tokens & Accessibility
- Design System Stylesheet: Inherits variables from
krewire-ui.css(--border,--radius,--pop-shadow). - Dark Mode: Automatically inverts surface and text colors when
data-theme="dark"or the.darkclass is applied to:root. - Zero-Bloat: Built natively with pure HTML primitives and scoped styles with zero npm dependencies.