We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The JavaScript Badge is a pure CSS control used to add notifications, messages, or statuses in different shapes and sizes. The Badge control can be easily integrated with ListView, Avatar, and other container controls.


Notification badge

The CSS Badge displays unread notification counts in different colors to indicate their priority level.


Pill badge

Create badges with rounded edges using the pill badge variant.


Create clickable link badges using the link CSS badge variant with an anchor element. It has hover and focus states.


Overlap badge

Create badges that overlap with profile icons or images, similar to social media notification count badges.


Badge position

The notification badge can be positioned at the top or bottom of profile icons or images. It is placed at the top by default.


Predefined styles

Eight predefined contextual color variants are available for badges.


Types of badges

The CSS Badge control supports six different styles: default, circle, pill, notification, ghost, and dot.


UI customization

Completely customize the CSS Badge attributes, like dimensions and colors.


Integration with other controls

Integrate the CSS Badge into various controls to achieve different UIs, such as displaying the number of unread messages in an email category or the status of product support.


Other supported frameworks

The Badge component is also available in our Angular, React, and Vue frameworks. Check out the Badge in different platforms from these links:


JavaScript Badge code example

Easily get started with the JavaScript Badge (HTML5 Badge) using a few simple lines of HTML and TS code, as demonstrated in the following. Also explore our JavaScript Badge example, which shows you how to render and configure the Badge in JavaScript.

<body>
    <div id='loader'>Loading....</div>
    <div id='container'>
        <div id='element'>
            <h1>Badge Component <span class="e-badge e-badge-primary">New</span></h1>
        </div>
    </div>
</body>


85+ JAVASCRIPT UI CONTROLS

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon