All skills
onmax avatar

/unocss

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

UnoCSS instant atomic CSS engine, superset of Tailwind CSS. Use when configuring UnoCSS, writing utility rules, shortcuts, or working with presets like Wind, Icons, Attributify.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/unocss

This session only. Nothing lands on disk.

referencespreset-tagify.md

≈504 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Preset Tagify

Use CSS utilities directly as HTML tag names.

Installation

import { defineConfig, presetTagify } from 'unocss'

export default defineConfig({
  presets: [
    presetTagify(),
  ],
})

Basic Usage

Instead of:

<span class="text-red">red text</span>
<div class="flex">flexbox</div>
<span class="i-line-md-emoji-grin"></span>

Use tag names directly:

<text-red>red text</text-red>
<flex>flexbox</flex>
<i-line-md-emoji-grin />

Works exactly the same!

With Prefix

presetTagify({
  prefix: 'un-'
})
<!-- Matched -->
<un-flex></un-flex>

<!-- Not matched -->
<flex></flex>

Extra Properties

Add CSS properties to matched tags:

presetTagify({
  // Add display: inline-block to icons
  extraProperties: matched => matched.startsWith('i-')
    ? { display: 'inline-block' }
    : {},
})

Or apply to all:

presetTagify({
  extraProperties: { display: 'block' }
})

Options

presetTagify({
  // Tag prefix
  prefix: '',

  // Excluded tags (won't be processed)
  excludedTags: ['b', /^h\d+$/, 'table'],

  // Extra CSS properties
  extraProperties: {},

  // Enable default extractor
  defaultExtractor: true,
})

Excluded Tags

By default, these tags are excluded:

  • b (bold)
  • h1 through h6 (headings)
  • table

Add your own:

presetTagify({
  excludedTags: [
    'b',
    /^h\d+$/,
    'table',
    'article',  // Add custom exclusions
    /^my-/,     // Exclude tags starting with 'my-'
  ],
})

Use Cases

  • Quick prototyping
  • Cleaner HTML for simple pages
  • Icon embedding: <i-carbon-sun />
  • Semantic-like styling: <flex-center>, <text-red>

Limitations

  • Custom element names must contain a hyphen (HTML spec)
  • Some frameworks may not support all custom elements
  • Utilities without hyphens need the prefix option
<!-- Source references: - https://unocss.dev/presets/tagify -->

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill is a comprehensive documentation set for UnoCSS, providing guidance on configuration, rules, presets, and framework integrations. It is a legitimate resource for web development, although it involves standard development tasks like installing packages and analyzing project files which presents a standard attack surface.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at de09c7b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.1.28",
  "source": "Generated from https://github.com/unocss/unocss, scripts located at https://github.com/antfu/skills"
}

README badge

README badge for onmax/nuxt-skills/unocss