Indicator

Indicator is a component that positions elements relative to a container, such as badges or status indicators. It allows precise positioning of overlay elements at different locations around the container.

Basic Usage

A simple indicator badge positioned relative to a container.

content
Code Example
Basic.vue

Components

The Indicator components include the following:

  • Indicator - Positions elements relative to a container.
  • IndicatorItem - Positioned element that appears relative to its parent Indicator.

Indicator

The Indicator component positions elements relative to a container, such as badges or status indicators. It creates a positioning context for IndicatorItem components.

Indicator Props Type Description
is
string

Allows changing the element tag. Default is div.

Indicator Slots Description
default

The default slot. Place the main content here along with IndicatorItem components.

IndicatorItem

The IndicatorItem component is positioned relative to its parent Indicator. It can be placed at various positions using horizontal and vertical alignment props.

IndicatorItem Props Type Description
is
string

Allows changing the element tag. Default is div.

align
string

Sets the horizontal alignment. Options: - start - center - end

   
start
boolean

Aligns the item to the start (left) of the container.

   
center
boolean

Aligns the item to the center of the container horizontally.

   
end
boolean

Aligns the item to the end (right) of the container.

vAlign
string

Sets the vertical alignment. Options: - top - middle - bottom

   
top
boolean

Positions the item at the top of the container.

   
middle
boolean

Positions the item in the middle of the container vertically.

   
bottom
boolean

Positions the item at the bottom of the container.

IndicatorItem Slots Description
default

The default slot. Place the indicator content here, such as badges or status indicators.

Examples

Primary Badge

An indicator with a primary badge.

new
content
Code Example
PrimaryBadge.vue

Button with Badge

An indicator badge positioned on a button.

99+
Code Example
ButtonWithBadge.vue

Bottom Positioned Button

A button positioned at the bottom of a card using IndicatorItem.

Job Title

Rerum reiciendis beatae tenetur excepturi

Code Example
BottomPositionedButton.vue

Centered Indicator

A centered indicator with custom content.

Uploading Image...
Code Example
CenteredIndicator.vue

All Positions

Demonstrates all possible IndicatorItem alignments (top, middle, bottom, start, center, end).

top+start
top+center
top+end
middle+start
middle+center
middle+end
bottom+start
bottom+center
bottom+end
content
Code Example
AllPositions.vue