flux
Grounded stack guidance: Tailwind-layer Do/Don't + docs URLs via
./scripts-run <skills-root>/corpus-grounding/scripts/ground search --manifest <skills-root>/design-intelligence/data/manifest.json --stack html-tailwind "<topic>". See
design-intelligence.
Positioning — dispatched, not standalone
flux is the primitive-library executor for projects on the
Livewire + Flux stack. It is invoked by
directives/ui/apply.ts
once the design brief is locked, and revisited by review.ts /
polish.ts during the design-review loop. It does not own the
flow, does not drive the audit, and does not lock the design.
When to use
Cite this skill when:
- The project depends on
livewire/flux and directives/ui/apply.ts dispatches Flux primitives
- Building forms, modals, dropdowns, toasts, or other standard UI elements that Flux already provides
Do NOT use when:
- Raw Blade templates without Flux (use
blade-ui skill)
- Livewire component logic / state (use
livewire skill)
- React + shadcn (use
react-shadcn-ui skill)
- Driving the full UI flow yourself — that is the
directives/ui/ orchestrator
Procedure: Create a Flux view
Step 0: Inspect
- Confirm Flux is installed — check
composer.json for livewire/flux.
- Check existing views — match Flux component usage patterns.
- Check Flux docs — https://fluxui.dev/docs for latest API.
Step 1: Build the view
- Use
<flux:*> components instead of raw HTML.
- Use
variant prop for styling (not custom Tailwind for standard styles).
- Use
wire:model for Livewire binding.
- Use
label prop on form fields (accessibility).
Step 2: Validate
- No raw HTML form elements where Flux equivalents exist.
- No manual error rendering (Flux has built-in validation display).
- No conflicting Tailwind classes overriding Flux styles.
Conventions
→ See guideline php/flux.md for component reference, variants, forms, icons.
Output format
- Blade view using Flux components with correct props and slots
- Livewire component class if interactive behavior is needed
Review pass — a11y findings + preview envelope
When this skill is dispatched by directives/ui/review.ts (test slot)
or directives/ui/polish.ts (verify slot) — i.e. a review/polish run,
not the initial apply — it also emits:
state.ui_review.a11y — {violations: [{rule, selector, severity}, ...], severity_floor?, accepted_violations?}. Use the same (rule, selector)
shape as state.ui_audit.a11y_baseline so the engine's de-dup matches
pre-existing entries on replay. Omit the envelope on apply passes; the
engine's _apply_a11y_gate only fires when a baseline is present.
state.ui_review.preview — {render_ok: bool, screenshot_path?, dom_dump_path?, error?, skipped?}. render_ok: false with error
populated triggers the preview_render_failed halt; render_ok: true
with screenshot_path threads the screenshot into the delivery
report's artifacts list. Browser tooling (Playwright/Cypress/…) is
a consumer-project dependency — this package does not ship one.
Polish dispatch: when the dispatcher skips review because a previous
review pass already returned SUCCESS, this skill MUST itself
synthesise the updated state.ui_review.findings (including any
remaining a11y_violation entries) so the engine's gate sees the
current state on the next polish round.
Gotcha
- The model tends to use old Flux API syntax — always check latest docs.
- Flux has built-in validation display — don't add manual error rendering alongside it.
- Don't mix Flux with raw HTML form elements in the same form.
Taste Dials
When DESIGN.md declares ## Taste Dials, honour them: Variance → layout-family spread + asymmetry tolerance; Motion → animation budget + reduced-motion posture; Density → spacing scale + information-per-viewport. Absent → follow the design brief's inferred dials.
Do NOT
- Do NOT use raw
<input>, <select>, <button> when Flux equivalents exist.
- Do NOT override Flux styles with conflicting Tailwind — use variants or slots.
- Do NOT skip the
label prop on form fields — accessibility.
Anti-slop
Flux primitives carry sane defaults, but composition still drifts into slop —
pull docs/guidelines/design-antipatterns.md
and check Layout (L1/L2 hero-metric + identical-card grids) and Color
(C1 gradient defaults) before shipping. Tailwind-level bans:
tailwind-engineer.
Auto-trigger keywords
- Flux UI
- Livewire components
- Flux component
- Laravel Flux
1---2name: flux3description: Use when the project uses `livewire/flux` — dispatched by `directives/ui/{apply,review,polish}.ts`. Covers Flux components, slots, variants, and form primitives.4---56# flux78> **Grounded stack guidance:** Tailwind-layer Do/Don't + docs URLs via9> `./scripts-run <skills-root>/corpus-grounding/scripts/ground search10> --manifest <skills-root>/design-intelligence/data/manifest.json11> --stack html-tailwind "<topic>"`. See12> [`design-intelligence`](../design-intelligence/SKILL.md).1314## Positioning — dispatched, not standalone1516`flux` is the **primitive-library executor** for projects on the17Livewire + Flux stack. It is invoked by18[`directives/ui/apply.ts`](../../templates/scripts/work_engine/directives/ui/apply.ts)19once the design brief is locked, and revisited by `review.ts` /20`polish.ts` during the design-review loop. It does **not** own the21flow, does **not** drive the audit, and does **not** lock the design.2223| Concern | Owner |24|---|---|25| Audit + token inventory (mandatory pre-step) | [`existing-ui-audit`](../existing-ui-audit/SKILL.md) |26| Design brief (layout / states / microcopy) | [`directives/ui/design.ts`](../../templates/scripts/work_engine/directives/ui/design.ts) |27| Universal design heuristics | [`fe-design`](../fe-design/SKILL.md) |28| Component logic / state / actions | [`livewire`](../livewire/SKILL.md) |29| Static Blade partials | [`blade-ui`](../blade-ui/SKILL.md) |3031## When to use3233Cite this skill when:3435- The project depends on `livewire/flux` and `directives/ui/apply.ts` dispatches Flux primitives36- Building forms, modals, dropdowns, toasts, or other standard UI elements that Flux already provides3738Do NOT use when:3940- Raw Blade templates without Flux (use `blade-ui` skill)41- Livewire component logic / state (use `livewire` skill)42- React + shadcn (use `react-shadcn-ui` skill)43- Driving the full UI flow yourself — that is the `directives/ui/` orchestrator4445## Procedure: Create a Flux view4647### Step 0: Inspect48491. Confirm Flux is installed — check `composer.json` for `livewire/flux`.502. Check existing views — match Flux component usage patterns.513. Check Flux docs — https://fluxui.dev/docs for latest API.5253### Step 1: Build the view54551. Use `<flux:*>` components instead of raw HTML.562. Use `variant` prop for styling (not custom Tailwind for standard styles).573. Use `wire:model` for Livewire binding.584. Use `label` prop on form fields (accessibility).5960### Step 2: Validate61621. No raw HTML form elements where Flux equivalents exist.632. No manual error rendering (Flux has built-in validation display).643. No conflicting Tailwind classes overriding Flux styles.6566## Conventions6768→ See guideline `php/flux.md` for component reference, variants, forms, icons.6970## Output format71721. Blade view using Flux components with correct props and slots732. Livewire component class if interactive behavior is needed7475### Review pass — a11y findings + preview envelope7677When this skill is dispatched by `directives/ui/review.ts` (test slot)78or `directives/ui/polish.ts` (verify slot) — i.e. a review/polish run,79not the initial apply — it also emits:8081- `state.ui_review.a11y` — `{violations: [{rule, selector, severity}, ...],82 severity_floor?, accepted_violations?}`. Use the same `(rule, selector)`83 shape as `state.ui_audit.a11y_baseline` so the engine's de-dup matches84 pre-existing entries on replay. Omit the envelope on apply passes; the85 engine's `_apply_a11y_gate` only fires when a baseline is present.86- `state.ui_review.preview` — `{render_ok: bool, screenshot_path?,87 dom_dump_path?, error?, skipped?}`. `render_ok: false` with `error`88 populated triggers the `preview_render_failed` halt; `render_ok: true`89 with `screenshot_path` threads the screenshot into the delivery90 report's `artifacts` list. Browser tooling (Playwright/Cypress/…) is91 a consumer-project dependency — this package does not ship one.9293Polish dispatch: when the dispatcher skips `review` because a previous94review pass already returned `SUCCESS`, this skill MUST itself95synthesise the updated `state.ui_review.findings` (including any96remaining `a11y_violation` entries) so the engine's gate sees the97current state on the next polish round.9899## Gotcha100101- The model tends to use old Flux API syntax — always check latest docs.102- Flux has built-in validation display — don't add manual error rendering alongside it.103- Don't mix Flux with raw HTML form elements in the same form.104105## Taste Dials106107When `DESIGN.md` declares `## Taste Dials`, honour them: Variance → layout-family spread + asymmetry tolerance; Motion → animation budget + reduced-motion posture; Density → spacing scale + information-per-viewport. Absent → follow the design brief's inferred dials.108109## Do NOT110111- Do NOT use raw `<input>`, `<select>`, `<button>` when Flux equivalents exist.112- Do NOT override Flux styles with conflicting Tailwind — use variants or slots.113- Do NOT skip the `label` prop on form fields — accessibility.114115## Anti-slop116117Flux primitives carry sane defaults, but composition still drifts into slop —118pull [`docs/guidelines/design-antipatterns.md`](../../../docs/guidelines/design-antipatterns.md)119and check Layout (L1/L2 hero-metric + identical-card grids) and Color120(C1 gradient defaults) before shipping. Tailwind-level bans:121[`tailwind-engineer`](../tailwind-engineer/SKILL.md).122123## Auto-trigger keywords124125- Flux UI126- Livewire components127- Flux component128- Laravel Flux