tailwind_colors 0.1.0
tailwind_colors: ^0.1.0

Flutter Android iOS web

Easily use the TailwindCSS color palette in dart. Features both the base TailwindCSS and TailwindUI color palettes.

tailwind_colors #

Dart package exposing Tailwind Colors to be used in flutter in a way similar to the Material colors.

Installation #

  1. Add to your pubspec.yaml file:
dependencies:
    tailwind_colors: any
  1. Get the package via your IDE or via the command line by typing:
$ pub get
  1. Import the tailwind_colors package
import 'package:tailwind_colors/tailwind_colors.dart;

How to Use #

Tailwind Colors can be created and used in the same way as the usual Material color palette.

    // TWColors has shades starting from 100 up to 900 in increment of 100
    Color myColor = TWColors.gray.shade100;
    Color mySecondColor = TWColors.blue.shade900;

TWColors features:

  • gray
  • red
  • orange
  • yellow
  • green
  • teal
  • blue
  • indigo
  • purple
  • pink

This package also features the TailwindUI color palette which can be accessed similarly:

    Color myTailwindUIColor = TWUIColors.cool_gray.shade50;

TWUIColors features all the TailwindUI counterparts to the normal Tailwind colors with the addition of:

  • The cool_gray color
  • An additional shade50 shade

TODO #

  • [ ] Create a parser for tailwind configuration files. Placeholder code can be found here
  • [ ] Show colors in the IDE tooltip
  • [ ] Make it possible to use the color swatch as is. (Like in ThemeData)
1
likes
110
pub points
47%
popularity

Easily use the TailwindCSS color palette in dart. Features both the base TailwindCSS and TailwindUI color palettes.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

maxime.bele@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on tailwind_colors