runway

Runway

Indicator

An indicator component for displaying file information


Indicator

Indicator

3+

Indicator

Offer

The Indicator component is a small badge or dot that can be used to indicate the status of an item, such as a notification or an unread message. It can be customized with different colors, sizes, and positions.



Usage

javascript

1import Indicator from "@/components/atoms/Indicator";
2
3<Indicator color="red" content="3+">
4    <Card borderRadius="sm" className="flex px-4 py-2">
5        Indicator
6    </Card>
7</Indicator>

The Indicator pairs well with the Card component.




Props

PropTypeDefaultDescription
childrenReactNode-The content that the indicator will be attached to.
contentstring""The content of the indicator.
colorstring"bg"The base color (use tailwind.config).
variantstring"solid"The variant of the indicator.
positionstring"top-right"The position of the indicator.
sizestring"md"The size of the indicator.
borderRadiusstring"full"The border radius of the indicator.
borderbooleanfalseIf true, the indicator will have a border.
pingbooleanfalseIf true, the indicator will have a ping effect.
pingScalenumber0.1The scale of the ping effect.
classNamestring""Additional Tailwind utility classes.
...propsobject-Any other valid HTML attributes.



Examples

Basic Indicator

Wrap your desired component with the Indicator component. Then, style or add content as needed.

Indicator
Indicator
3+
Indicator
Offer

Customized Indicator

You can further customize the Indicator component by changing its color, size, and position.

Indicator
New
Indicator
Alert
Indicator
Ping