Priority Icon
A work item priority as signal bars, with a filled alert for urgent.
Rendering Priority Icon…
Installation
Copy the source into your project with the CLI. It lands under @/components/ui and is yours to edit.
npx mlola-ui add priority-iconUsage
import { PriorityIcon } from "@/components/ui/priority-icon";
export default function Example() {
return (
<div className="ml-cluster">
<PriorityIcon priority="urgent" />
<PriorityIcon priority="high" />
<PriorityIcon priority="low" />
</div>
);
}Styling comes from the engine stylesheet and the nearest theme. Set it once at the root:
<html data-theme="graphite" data-mode="light">HTML
The markup the example above renders, exactly. It needs no script: write it from any language or template.
<div class="ml-cluster">
<svg class="ml-priority-icon" viewBox="0 0 14 14" width="1em" height="1em" data-priority="urgent" role="img" aria-label="Urgent"><rect x="1" y="1" width="12" height="12" rx="3" fill="currentColor"></rect><path d="M7 3.8v3.9" stroke="var(--ml-priority-mark)" stroke-width="1.6" stroke-linecap="round"></path><circle cx="7" cy="10" r="0.95" fill="var(--ml-priority-mark)"></circle></svg>
<svg class="ml-priority-icon" viewBox="0 0 14 14" width="1em" height="1em" data-priority="high" role="img" aria-label="High"><rect x="1.5" y="9" width="3" height="3.5" rx="1" fill="currentColor" opacity="1"></rect><rect x="5.5" y="5.8" width="3" height="6.7" rx="1" fill="currentColor" opacity="1"></rect><rect x="9.5" y="2.5999999999999996" width="3" height="9.9" rx="1" fill="currentColor" opacity="1"></rect></svg>
<svg class="ml-priority-icon" viewBox="0 0 14 14" width="1em" height="1em" data-priority="low" role="img" aria-label="Low"><rect x="1.5" y="9" width="3" height="3.5" rx="1" fill="currentColor" opacity="1"></rect><rect x="5.5" y="5.8" width="3" height="6.7" rx="1" fill="currentColor" opacity="0.28"></rect><rect x="9.5" y="2.5999999999999996" width="3" height="9.9" rx="1" fill="currentColor" opacity="0.28"></rect></svg>
</div>Options
| Prop | Values | Default |
|---|---|---|
priority | noneurgenthighmediumlow | — |
Every prop with a fixed set of values, read from the exported TypeScript types with its doc comment. Open the Code tab above for the rest of the API.
Classes and attributes
A class names each element; data-* and aria-* attributes carry its variant and state. The values listed are the ones the stylesheet draws; the default needs no attribute.
| Class | Attributes |
|---|---|
ml-priority-icon | data-priority="high | none | urgent" |
Accessibility and theming
- Semantic elements, accessible names and state relationships are part of the contract.
- Keyboard, pointer and touch paths are operable; focus stays visible in every theme.
- Light and dark modes pass WCAG AA contrast in all 5 canonical themes.
- Reduced motion and forced colors keep meaning and operation.