Tag

import {TagDirective} from "@qualcomm-ui/angular/tag"

Examples

Icons

Icons are supplied using the startIcon and endIcon properties.

<button emphasis="neutral" q-tag startIcon="Plus">Label</button>
<button emphasis="neutral" endIcon="Plus" q-tag>Label</button>

Variants

Choose from three variants: link, selectable and dismissable.

<button endIcon="Link2" q-tag variant="link">link</button>
<button q-tag variant="selectable">selectable</button>
<button q-tag variant="dismissable">dismissable</button>

Colors

Control the visual emphasis with different colors via the emphasis property.

<button emphasis="brand" q-tag>Label</button>
<button emphasis="outline-neutral" q-tag>Label</button>
<button emphasis="neutral" q-tag>Label</button>

Sizes

Choose from three sizes: sm, md and lg. The default size is md.

<button q-tag size="sm" variant="dismissable">Label</button>
<button q-tag size="md" variant="dismissable">Label</button>
<button q-tag size="lg" variant="dismissable">Label</button>

States

Disable the tag by setting the disabled property.

<button q-tag variant="dismissable">Label</button>
<button disabled q-tag variant="dismissable">Label</button>

Radius

Control the border radius of the tag with the radius property. The default radius is square.

<button q-tag radius="square">Label</button>
<button q-tag radius="rounded">Label</button>

API

q-tag

PropTypeDefault
Controls the component's interactivity. If true, the component becomes unresponsive to input and is visually dimmed to indicate its disabled state.
boolean
Governs the color of the tag.
| 'brand'
| 'outline-neutral'
| 'neutral'
'brand'
lucide-angular icon, positioned after the label. Note that this property is ignored if variant is dismissable, as it is reserved for the dismiss icon.
| LucideIconData
| string
Governs the shape of the tag.
| 'square'
| 'rounded'
'square'
Governs the size of the text, icons, spacing, and padding.
| 'sm'
| 'md'
| 'lg'
'md'
lucide-angular icon, positioned before the label.
| LucideIconData
| string
Governs the interactive style of the tag.
| 'link'
| 'selectable'
| 'dismissable'
Type
boolean
Description
Controls the component's interactivity. If true, the component becomes unresponsive to input and is visually dimmed to indicate its disabled state.
Type
| 'brand'
| 'outline-neutral'
| 'neutral'
Description
Governs the color of the tag.
Type
| LucideIconData
| string
Description
lucide-angular icon, positioned after the label. Note that this property is ignored if variant is dismissable, as it is reserved for the dismiss icon.
Type
| 'square'
| 'rounded'
Description
Governs the shape of the tag.
Type
| 'sm'
| 'md'
| 'lg'
Description
Governs the size of the text, icons, spacing, and padding.
Type
| LucideIconData
| string
Description
lucide-angular icon, positioned before the label.
Type
| 'link'
| 'selectable'
| 'dismissable'
Description
Governs the interactive style of the tag.

StartIcon, q-start-icon

EndIcon, q-end-icon

Note that the endIcon property and directive are ignored when variant is dismissible.