Directory

← Back

Badge

Java API for Lumo Badge for Vaadin 24, Vaadin 23.3.x and Vaadin 14.x.

Author

Rating

Popularity

600+

This component is Java API for Lumo Badge.

See more: https://vaadin.com/docs/v14/flow/styling/lumo/badges

Version for Vaadin 23 implements HasTooltip.

Sample code

// Create badge
Badge badge = new Badge("text");

// Set variant
badge.setVariant(BadgeVariant.SUCCESS);

// Set primary
badge.setPrimary(true);

// Set pill
badge.setPill(true);

// Add icon
badge.setIcon(VaadinIcon.USER.create());

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

Version 2.4.0

  • Add setPadding(boolean) to control padding feature, not effective below Vaadin 24.1
Released
2023-07-14
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 23+
Vaadin 14 in 1.0.0
Vaadin 23 in 2.0.0
Browser
Firefox
Opera
Safari
Google Chrome
iOS Browser
Android Browser
Microsoft Edge

Badge - Vaadin Add-on Directory

Java API for Lumo Badge for Vaadin 24, Vaadin 23.3.x and Vaadin 14.x. Badge - Vaadin Add-on Directory
This component is Java API for Lumo Badge. See more: https://vaadin.com/docs/v14/flow/styling/lumo/badges Version for Vaadin 23 implements HasTooltip.
Online Demo
View on GitHub

Badge version 1.0.0
### Version 1.0.0 - Initial release

Badge version 2.0.0
### Version 2.0.0 - Compatible with Vaadin 23 and newer

Badge version 2.0.1
### Version 2.0.1 - Remove excess console debug logging

Badge version 2.1.0
### Version 2.1.0 - Add support for html content, use setHtml(String)

Badge version 2.1.1
### Version 2.1.1 - Fix issue with Vite builds

Badge version 2.2.0
### Version 2.2.0 - Implemented HasTooltip, requires Vaadin 23.3.0

Badge version 2.2.1
### Version 2.2.1 - Fix theme property handling - Tested compatible with Vaadin 24

Badge version 2.2.2
### Version 2.2.2 - Fix broken tooltips with Vaadin 24

Badge version 2.2.3
### Version 2.2.3 - Fixed setText to clear content

Badge version 2.3.0
### Version 2.3.0 - Added WARNING enum for Vaadin 24.1 (has no effect on older Vaadin 23/24 versions)

Badge version 2.4.0
### Version 2.4.0 - Add setPadding(boolean) to control padding feature, not effective below Vaadin 24.1

Online