tailwind_ui_flutter library
tailwind_ui_flutter — Utility-first widgets for Flutter.
Import this single file to access every token, extension, and style utility the package provides:
import 'package:tailwind_ui_flutter/tailwind_ui_flutter.dart';
Classes
- TwBreakpoints
- 5 responsive breakpoints matching Tailwind CSS v4's default screen sizes.
- TwBreakpointTokens
- Breakpoint tokens.
- TwColor
-
A MaterialColor subclass that adds the Tailwind v4
shade950extra-deep shade which is not defined as a named getter on the standard MaterialColor. - TwColorExtension
- A ThemeExtension that exposes tailwind_ui_flutter tokens directly inside Flutter's native ThemeData.
- TwColors
- Tailwind CSS v4 complete color palette — 22 color families × 11 shades plus white, black, and transparent constants.
- TwColorTokens
- Colour tokens exposed via the theme.
- TwFontSizes
-
13 font-size tokens matching Tailwind CSS v4's
text-*utilities. - TwFontSizeValue
- A font-size token that bundles a size with its Tailwind-paired line-height.
- TwFontWeights
-
9 font-weight tokens matching Tailwind CSS v4's
font-*utilities. - TwOpacity
-
21 opacity steps matching Tailwind CSS v4's
opacity-*utilities. - TwOpacityTokens
- Opacity tokens.
- TwRadii
-
10 border-radius tokens matching Tailwind CSS v4's
rounded-*utilities. - TwRadiiExtension
- Exposes Tailwind border-radius tokens via ThemeData.extensions.
- TwRadiiTokens
- Border-radius tokens.
- TwRadiiValue
- A border-radius token that carries a raw pixel value and convenience BorderRadius getters for every corner combination.
- TwShadowExtension
- Exposes Tailwind shadow tokens via ThemeData.extensions.
- TwShadows
-
7 shadow presets matching Tailwind CSS v4's
shadow-*utilities. - TwShadowTokens
- Shadow tokens.
- TwSpacing
- 35 spacing values matching Tailwind CSS v4's default spacing scale.
- TwSpacingExtension
- Exposes Tailwind spacing tokens via ThemeData.extensions.
- TwSpacingTokens
- Spacing tokens — all 35 Tailwind spacing values.
- TwSpacingValue
- A single spacing value that carries both its raw px amount and convenience EdgeInsets getters for every direction.
- TwStyle
- A reusable, composable style object — the Flutter equivalent of a CSS class.
- TwStyleMerger
- Utility functions for merging and composing multiple TwStyle objects.
- TwTheme
- An InheritedWidget that injects a TwThemeData into the widget tree.
- TwThemeData
- Aggregates all design-token groups into one object that is injected into the widget tree via TwTheme.
- TwThemeExtensions
- A convenience method that returns all four Tailwind ThemeExtensions ready to register in ThemeData.extensions.
- TwTypographyTokens
- Typography tokens — font sizes, weights.
Enums
- TwBreakpointLabel
- Enum representing the current active Tailwind breakpoint label.
- TwVariant
- Variants control which version of a TwStyle is applied based on runtime conditions such as colour-scheme (light / dark).
Extensions
- TwContextExtension on BuildContext
- Convenience extensions on BuildContext for accessing TwTheme tokens without the verbosity of TwTheme.of.
-
TwStyleListExtension
on List<
TwStyle> -
Extension on
List<TwStyle>for fluent merge operations. - TwTextExtensions on Text
-
Utility-first extension methods on Text, mirroring Tailwind's typography
utilities (
text-*,font-*,uppercase,underline, etc.). - TwWidgetExtensions on Widget
- Utility-first extension methods on Widget, mirroring Tailwind CSS classes.