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.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. |
|---|---|
| Type | "warning" | "default" | "success" | "removed" | "discovery" | "danger" | "neutral" | "information" | "inprogress" | "moved" | "new" | 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. |
|---|---|
| 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. |
|---|---|
| Type | "warning" | "default" | "success" | "inverse" | "removed" | "discovery" | "danger" | "neutral" | "information" | "inprogress" | "moved" | "new" |