Badge Generator
Set the badge text, size, style, shape and colors. Add a status dot, a dismiss button or a keyboard-focusable label. Preview the component and download the files.
Test Keyboard Dismissal on an HTML Badge
Live preview
Badge Generator: how to use it
- Choose a preset, enter your own label and class name, and select the size, variant and shape.
- Set the colors and choose whether to display a status dot, a dismiss button or an interactive label.
- Use the preview to test keyboard focus and dismissal. Copy the HTML and CSS separately or download the standalone demo.
Limits and notes
The label supports up to 100 characters and is exported as text. The CSS class has up to 48 ASCII letters, digits, underscores or hyphens and starts with a letter or underscore. Editable colors use sRGB.
How your privacy works →Badge Generator: common questions
What does an interactive label do?
It makes the caption a native button with pointer, press and keyboard-focus styles. Connect it to your application's action.
Will the dismiss button work in the standalone HTML file?
Yes. A small local script removes its badge when activated. The HTML snippet includes the same behavior when dismissal is enabled.
What's the difference between Subtle and Ghost?
Subtle puts a lightly tinted fill behind the label. Ghost keeps the fill transparent.
Is the status dot included in the accessible label?
The dot is a decorative CSS shape. Put the status itself in the badge text so the wording describes it.