jaspr_declarative_tailwind 0.1.1 copy "jaspr_declarative_tailwind: ^0.1.1" to clipboard
jaspr_declarative_tailwind: ^0.1.1 copied to clipboard

A declarative tailwind generator for dart.

jaspr-declarative-tailwind #

A declarative Tailwind class generator written in dart

dart pub add jaspr-declarative-tailwind

Usage #

Wherever you may need Tailwind classes instantiate a TWClassList

//example with Jaspr's DomComponent
DomComponent(tag: "p", classes: TWClassList(generators: ));

The package provides a declarative interface to Tailwind's utility classes categorized by many common use cases in the form of TWGenerators

i.e

//example with flex styling in the layout generator
 DomComponent(
      tag: "p",
      classes: TWClassList(
          generators: TWGenerators.layout(flex: TWFlexValue.flexAuto)));

How does this work? Well, TwClass list is a descendant of the ListBase

i.e

 //this will work!
 List<String> classes = TWClassList(
          generators: TWGenerators.layout(flex: TWFlexValue.flexAuto));

If you need a super-string of all classes, We have overrided to the toString method

  print(TWClassList(
          generators: TWGenerators.layout(flex: TWFlexValue.flexAuto)));

  // output: 'flex flex-auto'
1
likes
110
points
72
downloads

Publisher

verified publishertherishabhsingh.com

Weekly Downloads

A declarative tailwind generator for dart.

Repository (GitHub)
View/report issues

Topics

#jaspr #web #html #css

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

jaspr, lints, test

More

Packages that depend on jaspr_declarative_tailwind