Coming Soon

We're sorry, but this feature is not yet available. We are working hard to make it happen as soon as possible. Thank you for your patience and understanding. Please check back later for updates.

Just a demo

The element you clicked is for demonstration purposes only and does not lead to actual content. Everything you see here is a simulation intended to demonstrate how the UI elements might look and behave in a real application.

Badge

Easily create nice looking notification badges.

Usage

Note If you are not using Tailwind CSS, you can skip this step. On your tailwind.config.js file, add the Badge component within the ui() plugin.

import ui from "franken-ui";
 
ui({
    components: {
        badge: {
            hooks: {}
        }
    }
}),

To create a badge, just add the .uk-badge class to an inline element like <a> or <span> element.

<span class="uk-badge"></span>
Copy to clipboard
  • 1 100
  • <span class="uk-badge">1</span>
    <span class="uk-badge">100</span>

Style modifiers

There are several style modifiers available. Just add one of the following classes to apply a different look.

ClassDescription
.uk-badge-primaryAdds a primary style.
.uk-badge-secondaryAdds a secondary style.
.uk-badge-dangerAdds a destructive style.
Copy to clipboard
  • 1 100 100 100
  • <span class="uk-badge">1</span>
    <span class="uk-badge uk-badge-primary">100</span>
    <span class="uk-badge uk-badge-secondary">100</span>
    <span class="uk-badge uk-badge-danger">100</span>

Available hooks

Learn more about using hooks.

Hook NameAffected Classes
hook-badge.uk-badge
hook-hover.uk-badge:hover
hook-misc*