Tag
Component Tag
.
Orange
html
<Card>
<Tag text="Orange" />
</Card>
Props
icon
icon &iconVariant
icon variant, in case you have included moreFont Awesome
variants.Vuersatile Components
only comes withsolid
bundled. (Defaultsolid
), (solid
,regular
,light
,thin
,duotone
,brands
).
Orange
html
<Card>
<Tag text="Orange" icon="paint-roller" />
</Card>
color
tag color. (Defaultgreyscale
), (amber
,orange
,red
,pink
,purple
,blue
,turquoise
,green
,lime
,greyscale
).
Orange
html
<Card>
<Tag text="Orange" icon="paint-roller" color="orange" />
</Card>
size
tag size. (Defaults
), (s
,m
).
Orange
html
<Card>
<Tag text="Orange" icon="paint-roller" color="orange" size="m" />
</Card>
showCloseButton
ifTag
is closable. Emits a@close
event. Check console for more information.
amber
orange
red
pink
purple
blue
turquoise
green
lime
greyscale
js
const colors = ['amber', 'orange', 'red', 'pink', 'purple', 'blue', 'turquoise', 'green', 'lime', 'greyscale']
const closeColor = (colorToRemove) => {
console.log(colorToRemove)
}
html
<Card>
<Tag v-for="color in colors" :key="color" class="mr-xs-2 mb-xs-2" :text="color" icon="paint-roller" :color="color" size="m" showCloseButton @close="closeColor(color)" />
</Card>