Tag (TTag)

VueJs custom HTML tag with configurable classes and infinite variants. Friendly with utility-first frameworks like TailwindCSS.

Playground:


Basic example

<t-tag tag-name="h1" variant="h3">
  This is my title
  <t-tag tag-name="span" variant="badge">new</t-tag>
</t-tag>
<t-tag tag-name="p" variant="body">This is the body of my content</t-tag>

This is my title new

This is the body of my content

Props

PropertyTypeDefault valueDescription
tagNameString'div'The HTML tag to use
textStringundefinedText inside the HTML tag
classesObjectundefinedThe default CSS classes
fixedClassesObjectundefinedThe default CSS Fixed classes shared for all variants
variantsObjectundefinedThe different variants of classes the component have
variant[String, Object]undefinedThe variant that should be used

Slots

SlotDescription
defaultContent of the tag

Sign up for our newsletter

Stay up-to-date on news and updates about this project by email.

I will never spam or share your email under any circustance.