0.6.2 • Published 1 year ago

@singlestone/tailwind-plugin-form-sugar v0.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

tailwind-plugin-form

Form plugin for the sugar design system

Prerequisites

Installation

Install @singlestone/tailwind-plugin-form-sugar with your NodeJS package manager of choice.

npm

$ npm install -D @singlestone/tailwind-plugin-form-sugar

Yarn

$ yarn add -D @singlestone/tailwind-plugin-form-sugar

pnpm

$ pnpm install -D @singlestone/tailwind-plugin-form-sugar

Setup

After installation, add Sugar to your tailwind.config.js like so:

// tailwind.config.js
module.exports = {
  mode: "jit",
  content: [
    // change this to fit your project as necessary
    "./src/**/*.{ts,tsx}",
    "./index.html",
  ],
  plugins: [
    require("@singlestone/tailwind-plugin-form-sugar").sugarFormsPlugin(),
  ],
};

Usage

Once you've followed the Installation and Setup process, you can use the CSS classes generated in your JavaScript and HTML.

Check out our Storybook for examples on how to do so.