Priority

A task's priority as four rising bars, the inactive ones at 25%, toned like its badge: low default, medium info, high warning, urgent and critical destructive. Critical turns the last bar into an exclamation mark. It's named for screen readers, so the bar count isn't the only signal.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { Priority } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

level

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse it for a task's priority in a task row or table cell, where the bars take less room than a word.
DoPass label={null} when the level is written beside the bars, so a screen reader doesn't hear it twice.
DoKeep critical for the few tasks that must not slip, like a limitation date. Its exclamation mark loses meaning when every task has one.
Don'tUse it for a status or a stage, like Overdue or Enquired. Use Badge, which says the state in words.
Don'tRecolour the bars with a class. Each level's tone matches its badge, and the bar count and name carry the level without colour.

Props

PropTypeDefaultDescription
level *"low" | "medium" | "high" | "urgent" | "critical"—low, medium, high, urgent or critical: how many bars fill, and their colour.
labelstring | null—What screen readers hear. "<Level> priority" by default; pass null when visible text beside it says so.
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { Priority } from "@leap-crm/design-system";

<Priority level="high" />