Add-on Directory

← Back

ToggleButton for Flow

Web Component providing an on/off switch that users can toggle

Author

Contributors

Rating

Popularity

800+

Usage

Toggle button provides an on/off switch that user can toggle by tapping the switch.

Client-side implementation

From 3.0.0

The client-side is a standard checkbox with a custom css file.

Before 3.0.0

This is the server-side (Java) API for Vaadin Platform for the vcf-toggle-button component. Looking for the client-side version? It can be found here: https://vaadin.com/directory/component/vaadin-component-factoryvcf-toggle-button

License & Author

This Add-on is distributed under Apache 2.0

Component Factory Toggle Button is written by Vaadin Ltd.

Sponsored development

Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing

Sample code

ToggleButton toggle = new ToggleButton();
toggle.setLabel("Label");
ToggleButton disabledToggle = new ToggleButton("Disabled");
disabledToggle.setEnabled(false);
ToggleButton toggle = new ToggleButton("Toggle");
Div message = new Div();
toggle.addValueChangeListener(evt -> message.setText(
        String.format("Toggle button value changed from '%s' to '%s'",
                evt.getOldValue(), evt.getValue())));

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Update web component version to 1.0.4 that includes fix that adds aria-label to label span to improve accessibility for screen readers.

Released
2023-05-05
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 14
Vaadin 24 in 3.0.0
Vaadin 23 in 3.0.0
Browser
Firefox
Safari
Google Chrome
Internet Explorer
Microsoft Edge

Grid Pagination - Vaadin Add-on Directory

Custom Vaadin 14+ Grid component with pagination feature enabled Grid Pagination - Vaadin Add-on Directory
**Editorial note:** *This add-on is no more actively developed. As an alternative you can check for example PagingGrid component in [Viritin add-on](https://vaadin.com/directory/component/flow-viritin) or [BeanTable](https://vaadin.com/directory/component/beantable).* Adding pagination feature to the Vaadin 14+ Grid component. Component originally created by Klaudeta Mertiku, now in maintenance mode by Team Parttio.
Source Code
Online Demo

Grid Pagination version 1.0.0
Custom Vaadin 10 Grid with pagination feature

Grid Pagination version 1.0.1
1. Fixing a NPE exception being thrown when grid items is set after grid being attached.
2. Adding PageChangeListener to the PaginatedGrid

Grid Pagination version 2.0.0
Adaption of GridPagination to be used with Vaadin 14.x with npm mode enabled. The add-on is using now the [lit-pagination](https://www.npmjs.com/package/lit-pagination) web-component which is published as a npm package.

Grid Pagination version 1.0.2
- Support for Vaadin 14+ (compatibility mode) - Initialize an empty DataProvider to fix NPE when component is attached before an explicit DataProvider is set

Grid Pagination version 1.0.3
Change access modifier of addPageChangeListener to public

Grid Pagination version 2.0.1
Change access modifier of listener to public

Grid Pagination version 2.0.3
- integrate lit-pagination.js inside this add-on here, - api to set pagination text from the server side component, - upgrade vaadin version to V14.1.25

Grid Pagination version 2.0.4
Excluding the `META-INF/VAADIN/config/flow-build-info.json` file from the add-on.

Grid Pagination version 2.0.5
Get rid of `[WARNING] Use the './' prefix for files in JAR files: 'lit-pagination.js', please update your component.`

Grid Pagination version 2.0.6
- Sorting feature using the grid columns - Text color of the paginator to be conform to the theme and variant set on the app

Grid Pagination version 2.0.7
New feature to set the location of the pagination element relative to the grid component. Options are TOP and BOTTOM.

Grid Pagination version 2.0.8
- add constructor with bean class type as parameter - add the possibility to place the pagination inside a given container (from PR #4)

Grid Pagination version 2.0.9
Add method to change visibility of pagination.

Grid Pagination version 2.0.10
- Delete banner.txt - Upgrade Vaadin version to 14.4.2

Grid Pagination version 3.0.0
Support for Vaadin 23 and forward

Grid Pagination version 4.0.0
Support for Vaadin 24

Grid Pagination version 4.0.1

Online