Skip to content

Latest commit

History

History
39 lines (27 loc) 路 954 Bytes

README.md

File metadata and controls

39 lines (27 loc) 路 954 Bytes

Installation

pnpm install @julr/unocss-preset-forms

Usage

import { defineConfig, presetAttributify, presetUno } from 'unocss'
import { presetForms } from '@julr/unocss-preset-forms'

export default defineConfig({
  presets: [
    presetUno(),
    presetForms(), // Add preflights and new rules likes `.form-input`

    presetForms({
      strategy: 'class', // Only add new rules likes `.form-input` and not preflights
    }),

    presetForms({
      strategy: 'base', // Only add preflights and not new rules
    }),

  ],
})

As this is a 1-1 port of the Tailwind plugin, please consult their documentation for more information: https://github.com/tailwindlabs/tailwindcss-forms

License

MIT License 漏 2022 Julien Ripouteau