Wind Kit는 Tailwind CSS의 유틸리티 중심 스타일링 접근 방식을 Flutter로 가져오며, 개발자가 위젯 내에서 'flex p-4 dark:bg-gray-800'와 같은 간결한 className 구문을 직접 사용할 수 있게 합니다. 코드 생성 없이 다크 모드, 반응형 브레이크포인트, 호버 상태 및 테마를 지원합니다. 빠른 UI 개발을 위해 설계되었으며, 플랫폼 간 일관되고 익숙한 문법으로 스타일링을 단순화합니다. 디자인 일관성과 빠른 프로토타이핑을 원하는 팀에게 이상적입니다.
사용 사례
빠른 UI 프로토타이핑
크로스 플랫폼 디자인 일관성
반응형 레이아웃
다크 모드 구현
유틸리티 우선 스타일링
주요 기능
유용성 우선의 className 구문
내장된 다크 모드 지원
반응형 브레이크포인트
호버 및 포커스 상태
테마 사용자 정의
코드 생성이 필요하지 않습니다
적합한 대상
Tailwind CSS에 익숙한 Flutter 개발자
디자인 시스템 일관성을 우선시하는 팀
빠른 UI 반복이 필요한 프로젝트
보일러플레이트 스타일링을 피하는 개발자
고려 사항
Tailwind 사용자가 아닌 사용자를 위한 학습 곡선
유틸리티 우선 워크플로우에 제한됨
과도한 클래스로 인한 성능 영향 가능성
하위 레벨 위젯 커스터마이징에 대한 제어가 적음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
wind_kit
Tailwind CSS for Flutter.
Utility-first className styling: 'flex p-4 dark:bg-gray-800' becomes an optimised widget tree, with dark mode, responsive breakpoints, hover states and theming built in. No codegen.
A rounded card with a dark theme, a shadow and a hover state costs a pyramid of widgets in plain Flutter, and the Flutter team has acknowledged the verbosity itself. wind_kit closes the gap with the utility names you already write on the web: one string, one widget.
That runs as written. No MouseRegion, no setState, no _isHovered boolean, no MediaQuery branch for the tablet layout.
The className language
wind_kit reads Tailwind's vocabulary (flex, p-4, bg-blue-500, rounded-lg, shadow-md) through a set of token parsers, and the W-prefix widgets that style themselves accept it: WDiv, WText, WButton, WInput, WSelect, WPopover, WTooltip, WDatePicker, WCard, WTabs, WBadge, WSwitch, WRadio and the WForm* wrappers that drop straight into a Flutter Form.
Rule
What it means
Prefixes
dark:, sm: to 2xl:, hover: / focus: / disabled: / loading: / selected: and ios: / android: / web: / mobile: / macos: / windows: / linux: stack freely. By convention <state>:<breakpoint>:<dark>:<platform>:<utility> reads best, but order does not matter.
Conflicts
The last class in a family wins. p-2 p-6 is padding 6.
Dark mode
Every colour token carries its dark: pair in the SAME className. Nothing checks it for you, so review it: bg-white alone stays white in dark mode.
Unknown tokens
An unknown family (ps-4) is dropped with a one-time kDebugMode hint. A known family with a bad value (text-7xl, bg-blu-500) or a mistyped prefix (hovr:) drops silently. A typo never throws and never renders a red screen.
Spacing scale
One step is 4 logical pixels, so p-4 is 16. Font size is pixel based too; tracking is em, as in Tailwind, so tracking-tight on 14px text is -0.35.
Press state
active: is not wired to the pointer. Track the press in your own state and pass states: {'active'} to the styled widget.
Caching
A parsed className is cached on className + breakpoint + brightness + platform + states, so rebuilds cost a map lookup.
wind_kit is not a literal Tailwind port: most classes paste between a web project and a Flutter one, and the gaps are listed. Transforms, filters, group-* / peer-*, container queries and @apply have no Flutter counterpart and are deliberately out of scope.
Theming
A WindThemeData holds the token scales (colours, spacing, typography, shadows, breakpoints, animations) and aliases. Defaults track Tailwind's own, and an alias names a bare token once for every widget.
The window is at least 640, 768, 1024, 1280 or 1536 px wide (the theme's screens, mobile first).
dark:
The theme brightness is dark, from the OS or from toggleTheme().
ios:android:web:mobile:macos:windows:linux:
The app runs on that platform.
Failure modes: inside a Row a child needs flex-1 to fill the row, and h-full fills any bounded parent, and below a WDiv vertical scroll it reports in debug whenever its incoming height is unbounded, whichever parent passes that height on (a direct child of the scroll, a padding-only WDiv, a flex flex-col), and under a plain SingleChildScrollView an unbounded height silently takes the screen height; give the scrolling child flex-1 overflow-y-auto inside a bounded column.
Variants
WindRecipe and WindSlotRecipe build a className from a base, variant axes, compound variants and a caller override, in a strict emission order with no merge magic to reason about.
One component's classNames. Calling it returns the className string.
recipe(variants: {...}, className: '...')
Override axes per call (null clears a default); the caller className is appended last.
WindCompoundVariant(conditions:, className:)
Classes that apply only when every condition matches.
WindSlotRecipe
The same for components with several parts: returns a map of slot to className.
Failure modes: the recipe appends the caller's className last and never dedupes (there is no twMerge), and a variant that overrides a border width or radius of the base must name every side or corner, because those families do not compose per side.
Server-driven UI
WDynamic renders a widget tree from JSON against an allowlist of wind_kit and Flutter core widgets, so a layout change can ship without a store release.
Named callbacks for onTap and friends, and the shared state the value widgets bind to by id.
maxDepth: / onUnknownWidget: / onError:
The recursion limit (default 50) and the stand-ins for a blocked type or a failed build.
Failure modes: a type outside the allowlist is not built, and className and image src values in untrusted JSON can load network and file images. A className such as bg-[/path/to/file.png] reads a local file on any allowed widget, WDiv included, and WImage fetches its src from the network, so denying WImage stops only the src fetch, and only while no WImage builder is registered (builders wins over denyWidgets): sanitise every className and src from untrusted JSON either way. See the security policy.
Forms
The WForm* wrappers (WFormInput, WFormSelect, WFormMultiSelect, WFormCheckbox, WFormDatePicker) extend Flutter's FormField, so Form validation just works and a failed validator switches on the error: state.
Styles the field while the validator reports a message.
label: / hint: / showError:
The label, the hint and the error line around the field.
WInput, WSelect, WCheckbox, WDatePicker
The raw controls, for forms you manage yourself.
A focused field lifts the whole input clear of the keyboard and of the keyboard toolbar above it, and a control with an onTap is one traversal stop that activates on Enter, Space, a gamepad A button and a TV remote. Failure modes: a FormField validator is synchronous, so server-side errors go through your own state and a second validate() call.
For AI coding agents
Rules for an agent writing wind_kit code. Each one is a mistake the maintainers already made once.
Do
Because
Import only package:wind_kit/wind_kit.dart
There is one barrel and no sub-barrels.
Pair every colour token (bg-, text- colour, border-, ring-, shadow-, fill-) with its dark: peer in the same className
A missing pair is a bug and nothing reports it.
Route conditions through states: and prefixed classes, never Dart interpolation inside a className
An interpolated token hides from the dark-pair review and from grep, and every distinct string adds a cache entry.
Give a Row child flex-1; give a scrolling child of a bounded Column flex-1 overflow-y-auto
h-full fills any bounded parent; below a WDiv vertical scroll it reports in debug whenever its incoming height is unbounded, whichever parent passes that height on (a direct child of the scroll, a padding-only WDiv, a flex flex-col), and under a plain SingleChildScrollView an unbounded height silently takes the screen height.
Pass child or children, never both
Both fail an assertion at construction.
Spell-check token values by hand
A known family with an unsupported value (text-7xl) drops silently; only an unknown family prints the one-time debug hint.
Give an icon-only WButton a semanticLabel
Without it the control is nameless to screen readers.
Drive focus with focusNode or autofocus on WAnchor / WButton, never an outer Focus
A given focusNode is yours and the anchor never disposes it; autofocus takes focus only when nothing in scope has it.
Call WindParser.clearCache() in test setUp
The parser cache persists between tests and gives false positives.
Call Wind.installDebugResolver() once in main, behind !kReleaseMode
It exposes widget state to tools such as tapir and is tree-shaken from release builds; do not add it per screen.
Install the skill, which is the source of truth for the className grammar, the widget surface and the anti-patterns:
npx skills add anilcancakir/wind_kit
It is also distributed through the skill registry (npx skills add anilcancakir/ai --skill wind-ui) to OpenCode, Claude Code, Cursor, Gemini CLI, Codex CLI, Antigravity CLI, Cline and Roo Code. The docs MCP server of anilcancakir.com (https://mcp.anilcancakir.com/, Streamable HTTP, no auth) exposes list_packages, list_docs, search_docs and read_doc over every package's documentation. The machine-readable inventory is llms.txt, and internals are in ARCHITECTURE.md.
Dependencies
material_ui for the Material types the theme and the widgets build on, flutter_svg for WSvg and wind_kit_diagnostics_contracts, the neutral bridge through which debug tools read widget state without depending on wind_kit. That is the whole runtime surface: no state management library, no router, no mocking library.
Links
Documentation: every widget, parser token, theme field, dark mode, responsive design and WDynamic, with live previews