Priority Pill
This badge is used to indicate the order of importance.
Figma Link
- Web Components
- Flutter
Demo
zeta-web v0.12.9
Web Components
Storybook
https://design.zebra.com/web/storybook/?path=/docs/components-badges--docs
Slots
| Name | Description | Type |
|---|---|---|
| default | Main text of the priority pill. | text |
Attributes
| Name | Description | Type | Default |
|---|---|---|---|
| label | Text of Priority.Can also be slotted. | string | undefined | undefined |
| index | Character shown at start of component. Will be truncated to a single character if longer.Can also be slotted.The value of this property is usually a single digit number that indicates the priority level. | string | number | undefined | undefined |
| status | (Optional) Status of the priority pill.This changes the color and content of the pill.If not provided, the primary color will be used. | "urgent" | "high" | "medium" | "low" | undefined | undefined |
| size | Size of the priority pill | "small" | "large" | "large" |
| type | Type of the priority pillLozenge shows the whole badge, including the text, while badge only shows the index character. | "badge" | "lozenge" | "lozenge" |
Inherited Attributes
| Name | Description | Type | Default | Inherited From |
|---|---|---|---|---|
| rounded | Whether the component is rounded or sharp.When true, rounded will set the border radius of the first child, and any children with class 'contourable-target' to --radius-minimal.Otherwise, this value will be --radius-none. | boolean | undefined | true | Contourable |
CSS Properties
| Name | Description |
|---|---|
| --priority-pill-index-background-color | Color of the index character. |
| --priority-pill-index-text-color | Background color of the index. |
| --priority-pill-text-color | Color of the text. |
| --priority-pill-background-color | Background color of the pill. |
Demo
Widgetbook
Inheritance
Object > DiagnosticableTree > Widget > StatelessWidget > ZetaStatelessWidget
Constructors
Constructs ZetaPriorityPill
ZetaPriorityPill.new({bool? rounded, Key? key, String? index, String? label, bool isBadge = false, ZetaPriorityPillStatus status = ZetaPriorityPillStatus.urgent, @Deprecated('Use Status instead. This will be removed in the next major version.') ZetaPriorityPillType type = ZetaPriorityPillStatus.urgent, ZetaPriorityPillSize size = ZetaPriorityPillSize.large, ZetaColorSwatch? customColor, String? semanticLabel})
Properties
| Name | Description | Type | Features |
|---|---|---|---|
| customColor | Color override | ZetaColorSwatch? | final |
| hashCode | The hash code for this object. | int | no setter inherited |
| index | Leading number / character in component. Will be truncated to single character. | String? | final |
| isBadge | Indicates if it is badge or lozenge. | bool | final |
| key | Controls how one widget replaces another widget in the tree. | Key? | final inherited |
| label | Text in main part of component. | String? | final |
| rounded | Sets rounded or sharp border of the containing box and the icon style. | bool? | final inherited |
| runtimeType | A representation of the runtime type of the object. | Type | no setter inherited |
| semanticLabel | The value passed into wrapping Semantics widget. | String? | final |
| size | The size of ZetaPriorityPill. | ZetaPriorityPillSize | final |
| status | The status of ZetaPriorityPill. | ZetaPriorityPillStatus | final |
| type | The type of ZetaPriorityPill. | ZetaPriorityPillType | final |