Atoms
Status Dot
A static dot indicator of status, with the Badge Status variants.
FormanceCustom component built for Formance products.
Installation#
npx shadcn@latest add @formance/status-dotInstall the following dependencies:
npm install class-variance-authorityCopy and paste the following code into your project.
Update the import paths to match your project setup.
Usage#
import { StatusDot } from '@/components/ui/status-dot'<StatusDot variant="valid">Active</StatusDot>Examples#
Label#
Best practices#
- Use the same variants as Badge Status:
valid,destructive,info,warning,zinc(default) andoutline. Use the dot where a badge takes too much space, for example in a table cell or a list row. - The dot is static. Do not add a spinner next to it.
- Give the status as text next to the dot: the colour must not be the only signal. Do not add text such as
Status: Active: the label gives the status. - The component draws the first letter of the label in upper case:
readyshows asReady. It does not change the other letters, so an acronym such asEBICSstays the same. Give the label in sentence case when you can. - When the dot has no text, give it a name:
<StatusDot variant="valid" role="img" aria-label="Active" />.