Toggle Button Add-On - Vaadin Add-on Directory
Toggle button built on Vaadin components with support for customizable labels and iconsStarting with version 2.0, the add-on is built on top of the core Vaadin Switch component. The switch itself (keyboard, focus, accessibility, read-only and disabled states) comes from Vaadin, and the add-on adds side labels, icons, label highlighting, theme variants and touch swipe around it.
#### Features
* Toggle between two states with a click, a tap, a swipe, or the Space key
* Customizable left and right labels
* Support for icons on both sides, set with setLeftIcon and setRightIcon
* Optional label highlighting: active-side label uses the theme variant color (primary, success, warning, error, or contrast), inactive side is dimmed
* Optional icons-inside layout: icons adjacent to the switch, labels on the outer edges
* Theme variants: SMALL, MEDIUM, LARGE, LONGSWIPE, PRIMARY, SUCCESS, WARNING, ERROR, CONTRAST
LONGSWIPE variant produces a wider switch track, optimized for touch interaction; can be combined with size variants
* Accessible out of the box: announced as a switch with its on/off state, focusable, and operable with the keyboard
* Form support: helper text, required indicator, error message, and Binder validation
* Works with both the Lumo and Aura themes
Fluent API for easy configuration
Full integration with Vaadin's HasValue, HasSize, HasLabel, HasAriaLabel, HasTooltip, HasHelper, HasValidationProperties, and Focusable
#### Found a bug or have a suggestion? Report it on GitHub
For bug reports, feature suggestions, or questions, please open an issue on [GitHub](https://github.com/FlowingCode/ToggleButton/issues). This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
View on GitHubAuthor Homepage
Online Demo
Issue tracker
Toggle Button Add-On version 1.0.0
Initial implementation
Toggle Button Add-On version 2.0.0
#### New features:
* Rebuild on top of the core Switch component ([#7](https://github.com/FlowingCode/ToggleButton/issues/7))