tag
Reusable tag component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<tag
label="label"
variant="default"
/>Legacy mount name: data-component="tag".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
label | string | Optional | "" |
variant | string | Optional | "default" |
class | string | Optional | "" |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/tag.wrn
// Small tag / chip. variant: default | primary | success | danger | warning.
component Tag {
props {
label = ""
variant = "default"
class = ""
}
view {
<span class="wire-tag wire-tag--{variant} {class}">
<slot>{label}</slot>
</span>
}
}