# @unocss/preset-tagify
Tagify Mode for [UnoCSS](https://github.com/unocss/unocss).
## Installation
```bash
npm i -D @unocss/preset-tagify
```
```ts
import presetTagify from '@unocss/preset-tagify'
Unocss({
presets: [
presetTagify({ /* options */ }),
// ...other presets
],
})
```
## Tagify Mode
This preset can come in handy when you only need a single unocss rule to be apply on an element.
```html
red text
flexbox
I'm feeling today!
```
With tagify mode, you can embed CSS styles into HTML tags:
```html
red text
flexbox
I'm feeling today!
```
The HTML above works exactly as you would expect.
## With Prefix
```js
presetTagify({
prefix: 'un-'
})
```
```html
```
## Extra Properties
You can inject extra properties to the matched rules:
```js
presetTagify({
// adds display: inline-block to matched icons
extraProperties: matched => matched.startsWith('i-')
? { display: 'inline-block' }
: { }
})
presetTagify({
// extraProperties can also be a plain object
extraProperties: { display: 'block' }
})
```
## License
MIT License © 2022-PRESENT [Jeff Zou](https://github.com/zojize)
MIT License © 2022-PRESENT [Anthony Fu](https://github.com/antfu)