Skip to content
Wesley LEVASSEUR edited this page Mar 4, 2023 · 4 revisions

Use

  • Handling Hover, Focus, and Other States not typed.

  • But all others is typed.

Import

import type {TextColor} from "tailwindcss-types";
//or
import {TextColor} from "tailwindcss-types";

Svelte

Must be for most projects

import type {TextColor} from "tailwindcss-types";

Example

Simple usage

let value: TextColor = 'text-neutral-100' //OK
let value: TextColor[] = ['text-neutral-100', 'text-sm'] //OK


let value: TextColor = 'dark:text-neutral-100' //NOT OK
let value: TextColor = 'hover:text-neutral-100' //NOT OK

To use Handling Hover, Focus, and Other States you must add string type.

let value: string | TextColor = 'dark:text-neutral-100' // OK
let value: string[] | TextColor[] = ['hover:text-neutral-100', 'focus:text-sm'] //OK

Installation

npm install --save tailwindcss-types

npm install --save-dev tailwindcss-types

Summary

This package contains all type definitions for tailwindcss (https://tailwindcss.com).

Links

Refer to Wiki - https://github.com/git-init-wesley/tailwindcss-types/wiki

Refer to Typedoc - https://git-init-wesley.github.io/tailwindcss-types/docs

Request Issue - https://github.com/git-init-wesley/tailwindcss-types/issues

Details

Files were exported to https://github.com/git-init-wesley/tailwindcss-types

Additional Details

  • Version: 3.2.7 (r.1)
  • Last updated: 22 Feb 2023 00:00 (UTC)
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Wesley LEVASSEUR

Clone this wiki locally