Indicator
Indicator is used to place an element (like a badge or status dot) on the corner of another element. Uses Indicator.Item sub-component for the positioned content.
Import
import { Indicator } from '@sigx/daisyui';
Basic Usage
A simple indicator badge on a content area.
Loading preview...
Badge on Button
Show a notification count on a button.
Loading preview...
All Positions
Use vertical (top, middle, bottom) and horizontal (start, center, end) props on Indicator.Item to control placement.
Loading preview...
Multiple Indicators
Use multiple Indicator.Item children to show indicators at different corners.
Loading preview...
For Avatar
Show a status badge on an avatar.
Loading preview...
For Input
Show a "Required" badge on an input field.
Loading preview...
Center on Image
Use center placement to overlay content on an image.
Loading preview...
Props
Indicator
| Prop | Type | Default | Description |
|---|---|---|---|
class | string | — | Additional CSS classes for the container |
Indicator.Item
| Prop | Type | Default | Description |
|---|---|---|---|
vertical | 'top' | 'middle' | 'bottom' | — | Vertical alignment of the indicator item |
horizontal | 'start' | 'center' | 'end' | — | Horizontal alignment of the indicator item |
class | string | — | Additional CSS classes for the indicator item |