Utility Reference

Core Flutterwind utility groups and class patterns.

Flutterwind follows a utility-first approach inspired by Tailwind CSS.
Use utility classes with .className('...') on widgets.

Syntax cheatsheet

Text('Title').className('text-xl font-bold text-slate-900')
Container().className('p-4 rounded-lg bg-blue-500')
Row(children: []).className('flex items-center justify-between')

Utility groups

GroupExamples
Layoutflex, grid, items-center, justify-between
Spacingm-4, mt-2, p-6, gap-3
Sizingw-full, h-12, max-w-md
Typographytext-sm, text-xl, font-bold, text-center
Colorstext-blue-600, bg-zinc-100, border-zinc-300
Border & Radiusborder, border-2, rounded, rounded-xl
Effectsshadow-sm, shadow-lg, blur-sm, brightness-125
Transformscale-105, rotate-6, translate-x-2
Responsivemd:text-base, lg:grid-cols-3, xl:p-8
Stateshover:bg-blue-700, focus:ring-2

Order of writing classes

Use a predictable order to keep code readable:

  1. Layout (flex, grid, alignment)
  2. Spacing (p-*, m-*, gap-*)
  3. Sizing (w-*, h-*)
  4. Visual style (colors, borders, radius, shadow)
  5. Typography
  6. Responsive variants
  7. Interaction states
Container().className(
  'flex items-center justify-between p-4 w-full rounded-lg border border-zinc-200 bg-white text-sm md:p-6 hover:shadow-md',
)

Common pitfalls

  • Use valid utility names from your supported Flutterwind set.
  • Prefer flutterwind.yaml for token customization instead of hardcoded arbitrary values everywhere.
  • Keep base styles mobile-first, then add sm:, md:, lg: variants.

Explore by category

  • Layout & spacing: /components/layout-spacing
  • Typography & colors: /components/typography-colors
  • Effects & transforms: /components/effects-transforms
  • Transform cheatsheet: /components/transform-cheatsheet
  • UI blocks and presets: /components/ui-blocks
  • Runtime parity: /reference/tailwind-v4-runtime-parity
  • Support matrix: /reference/generated-support-matrix