Lozenge
A lozenge is a prominent, compact label used to communicate a meaningful attribute that affects how people understand, prioritize or act on an object.Generally available
The new lozenge is stable and ready for adoption. Visual updates are currently behind the platform-dst-lozenge-tag-badge-visual-uplifts feature flag.
Installation
| Install | yarn add @atlaskit/lozenge |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/lozenge, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | The appearance of the lozenge. Supports legacy semantic appearances and new semantic colors. Accent appearance values. |
|---|---|
| Type | "default" | "inprogress" | "moved" | "new" | "removed" | "success" | "warning" | "danger" | "information" | "neutral" | "discovery" | AccentColor |
| Description | Elements to be rendered inside the lozenge. This should ideally be just a word or two. |
|---|---|
| Type | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal |
| Description | Icon to display before the text content. Should be an ADS icon component. |
|---|---|
| Type | ComponentClass<Omit<NewIconProps, "spacing">, any> | FunctionComponent<Omit<NewIconProps, "spacing">> |
| Description | Deprecated. Will be removed in a future major release. Lozenge will be bold by default. For labels and categorization, use Tag instead. |
|---|---|
| Type | boolean |
| Description | max-width of lozenge container. Default to 200px. |
|---|---|
| Type | string | number |
| Description | Controls the overall spacing (padding + height) of the lozenge.
|
|---|---|
| Type | "default" | "spacious" |
| Description | Style customization to apply to the lozenge. Only |
|---|---|
| Type | { color?: Color; backgroundColor?: BackgroundColor; } |
| Description | A |
|---|---|
| Type | string |
| Description | Numeric metric displayed at the end of the lozenge as a badge. Trailing metric is not supported for accent lozenges. |
|---|---|
| Type | string |
| Description | Overrides the appearance of the trailing metric badge. If not specified, the trailing metric badge inherits the lozenge appearance. This prop is not supported for accent lozenges. Trailing metric appearance is not supported for accent lozenges. |
|---|---|
| Type | "default" | "inprogress" | "moved" | "new" | "removed" | "success" | "warning" | "danger" | "information" | "neutral" | "discovery" | "inverse" |