Skip to content

Commit 07cc262

Browse files
docs(readme): document HasLabel support and label constructors
1 parent 371c752 commit 07cc262

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A toggle button component for Vaadin Flow that supports customizable labels and
1616
* Optional label highlighting: active-side label uses the primary color, inactive side is dimmed
1717
* Theme variants: `SMALL`, `MEDIUM`, `LARGE`, `PRIMARY`, `SUCCESS`, `WARNING`, `ERROR`, `CONTRAST`
1818
* Fluent API for easy configuration
19-
* Full integration with Vaadin's `HasValue`, `HasSize`, `HasAriaLabel`, and `HasTooltip`
19+
* Full integration with Vaadin's `HasValue`, `HasSize`, `HasLabel`, `HasAriaLabel`, and `HasTooltip`
2020

2121
## Online demo
2222

@@ -100,6 +100,12 @@ FC Toggle Button Add-On is written by Flowing Code S.A.
100100
// Basic toggle button
101101
FCToggleButton toggle = new FCToggleButton();
102102

103+
// With a field label (shown above the toggle)
104+
FCToggleButton toggle = new FCToggleButton("Notifications");
105+
106+
// With a field label and initial value
107+
FCToggleButton toggle = new FCToggleButton("Dark mode", true);
108+
103109
// With labels
104110
FCToggleButton toggle = new FCToggleButton()
105111
.setLeftLabel("Off")

0 commit comments

Comments
 (0)