@lemonadejs/toggle
v1.0.1
Published
LemonadeJS JavaScript reactive toggle button with icon support
Maintainers
Readme
LemonadeJS Toggle
A reactive toggle button component with icon support.
Features
- Material icon support
- Hidden checkbox input
- Highlight when checked
- Customizable width
- Design system colors
Usage
<Toggle icon="mic" text="Microphone" />Properties
| Property | Type | Description | |----------|------|-------------| | text | string | Label text displayed next to the toggle | | icon | string | Material icon name (e.g., 'mic', 'videocam') | | value | boolean | Current toggle state | | width | string | Width of the toggle (e.g., '100px', '50%') | | name | string | Input name attribute | | disabled | boolean | Whether the toggle is disabled | | position | string | Text position ('right' or undefined) | | color | string | Color variant |
Events
| Event | Description | |-------|-------------| | onchange | Fired when the toggle state changes |
License
MIT
