Indicator Component
A flexible indicator component built with Tailwind CSS for overlaying badges, status dots, and notification counts on other elements. Supports all nine placement positions and multiple sizes. Perfect for notification badges on avatars, buttons, and cards in modern UIs.
Indicator components display status, badges, or notifications positioned on other elements. Built with absolute positioning and flexible styling, indicators overlay important information on cards, avatars, and buttons. The Frutjam indicator system supports multiple placements, sizes, and colors—ideal for notification badges, status markers, and visual cues.
| Class | Type | Description |
|---|---|---|
| indicator | Base | Relative-positioned wrapper for the indicator item |
| indicator-item | Modifier | Absolutely positioned badge or dot element |
| indicator-top | Modifier | Positions item at the top edge |
| indicator-middle | Modifier | Positions item at the vertical middle |
| indicator-bottom | Modifier | Positions item at the bottom edge |
| indicator-start | Modifier | Positions item at the left edge |
| indicator-center | Modifier | Positions item at the horizontal center |
| indicator-end | Modifier | Positions item at the right edge |
Basic Usage
99+
1 2 3 4 | <div class="indicator"> <span class="indicator-item badge badge-primary">99+</span> <button class="btn">Messages</button> </div> |
1 2 3 4 | <div className="indicator"> <span className="indicator-item badge badge-primary">99+</span> <button className="btn">Messages</button> </div> |
1 2 3 4 | <div class="indicator"> <span class="indicator-item badge badge-primary">99+</span> <button class="btn">Messages</button> </div> |
Indicator Placements
↖︎
↑
↗︎
←
●
→
↙︎
↓
↘︎
Box
html
1 2 3 4 5 6 7 8 9 10 11 12 | <div class="indicator"> <span class="indicator-item indicator-top indicator-start badge badge-primary">↖︎</span> <span class="indicator-item indicator-top indicator-center badge badge-secondary">↑</span> <span class="indicator-item indicator-top indicator-end badge badge-accent">↗︎</span> <span class="indicator-item indicator-middle indicator-start badge badge-info">←</span> <span class="indicator-item indicator-middle indicator-center badge badge-neutral">●</span> <span class="indicator-item indicator-middle indicator-end badge badge-success">→</span> <span class="indicator-item indicator-bottom indicator-start badge badge-warning">↙︎</span> <span class="indicator-item indicator-bottom indicator-center badge badge-primary">↓</span> <span class="indicator-item indicator-bottom indicator-end badge badge-error">↘︎</span> <div class="bg-base-200 grid h-32 w-60 place-items-center rounded-box">Box</div> </div> |
Indicator in Tabs
html
1 2 3 4 5 6 7 8 | <div class="tabs tabs-lifted"> <a class="tab">Messages</a> <a class="indicator tab tab-active"> Notifications <span class="indicator-item badge">7</span> </a> <a class="tab">Requests</a> </div> |
Indicator on Input
Required
html
1 2 3 4 | <div class="indicator"> <span class="indicator-item badge badge-neutral badge-sm">Required</span> <input type="text" placeholder="Your email address" class="input" /> </div> |
Indicator on Image
Only available for Pro users
html
1 2 3 4 5 6 7 8 9 | <div class="indicator"> <span class="indicator-item indicator-middle indicator-center badge"> Only available for Pro users </span> <img alt="Tailwind CSS examples" src="" /> </div> |
Indicator on Cards
New
Product Name
Product description and details go here.
html
1 2 3 4 5 6 7 8 9 | <div class="indicator"> <span class="indicator-item badge badge-success">New</span> <div class="card card-outline"> <div class="card-content"> <h2 class="card-title">Product Name</h2> <p>Product description and details go here.</p> </div> </div> </div> |
Indicator on Avatar
JS
html
1 2 3 4 | <div class="indicator"> <span class="indicator-item indicator-top indicator-end badge badge-circle badge-success"></span> <div class="avatar">JS</div> </div> |
Responsive Behavior
New
html
1 2 3 4 | <div class="indicator"> <span class="indicator-item indicator-bottom indicator-start sm:indicator-top sm:indicator-end badge badge-primary">New</span> <button class="btn">Responsive</button> </div> |