Tag
Tags show concise metadata in a compact format.
Note: The Tag component is meant to be interactive. If you are looking for a non-interactive Tag-like component, consider the Badge component.
Default
LabelImage Variant
LabelSage Component
SageTag
<%= md("**Note:** The Tag component is meant to be interactive. If you are looking for a non-interactive Tag-like component, consider the #{link_to("Badge", pages_component_path("badge"))} component.") %>
<%= sage_component SagePanelStack, {} do %>
<h3 class="t-sage-heading-6">Default</h3>
<%= sage_component SageTag, {
value: "Label",
show_dismiss: true,
dismiss_attributes: {
"data-js-copy-button": "Label"
}
} %>
<h3 class="t-sage-heading-6">Image Variant</h3>
<%= sage_component SageTag, {
value: "Label",
image: "avatar/koray_okumus.png",
show_dismiss: true,
dismiss_attributes: {
"data-js-copy-button": "Label"
}
} %>
<% end %>
Property | Description | Type | Default |
---|---|---|---|
|
Provides button attributes to wire up functionality to the close button. |
Hash |
|
|
Adds a presentational image to the left of the label. |
String |
|
|
Determines whether the close button renders or not. |
Boolean |
|
|
Provides a label for the tag. |
String |
|
Do
Don't