flux-ui-patterns
Skill1 starsChanged 6 months agoMITView on GitHub
Build TALL stack UIs with Flux UI the intended way - pick the right component, compose forms and tables, theme with CSS variables, and avoid fighting the library with custom CSS. Use when building or reviewing Blade views in a project using Flux, converting custom Tailwind markup to Flux components, or deciding between Flux and hand-rolled UI.
In this repository50 other files it gives its agents.
- accessibility-reviewSkill
- adr-authorSkill
- api-designSkill
- architecture-reviewSkill
- caching-strategySkill
- changelogSkill
- ci-cd-pipelineSkill
- codebase-explorationSkill
- code-reviewSkill
- code-style-guideSkill
- context-engineeringSkill
- conventional-commitsSkill
- cost-optimizationSkill
- database-migrationSkill
- data-privacy-reviewSkill
- debuggingSkill
- dependency-updateSkill
- deprecation-migrationSkill
- error-handlingSkill
- feature-flag-rolloutSkill
- filament-resource-designSkill
- git-workflowSkill
- i18n-reviewSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- inertia-patternsSkill
- laravel-ai-featuresSkill
- laravel-eloquent-performanceSkill
- laravel-queue-designSkill
- laravel-testingSkill
- livewire-component-designSkill
- llm-feature-designSkill
- observabilitySkill
- onboarding-docSkill
- performance-budgetSkill
- pr-descriptionSkill
- primevue-patternsSkill
- refactoringSkill
- release-checklistSkill
- resilience-patternsSkill
- runbook-authorSkill
- security-auditSkill
- spec-writingSkill
- task-breakdownSkill
- tech-debt-triageSkill
- test-writingSkill
- threat-modelingSkill
- using-elyra-skillsSkill
- vue-component-patternsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Check Flux first, build second: Before hand-rolling any control, check whether a Flux component (or composition of two) covers it.
- Very specific: line 27
Props before classes: Use variant, size, icon props for supported variations.
- Very specific: line 37
No match? Compose primitives (flux:dropdown + flux:navlist, flux:modal + form) before writing custom markup
- Very specific: line 49
Every input gets the field/label/error wrapper — that's where the a11y wiring lives
- Distinctive: line 57
After Livewire actions: toast via Flux's toast component, triggered from the component — not inline status divs
- Distinctive: line 61
Use Flux's table for sortable/paginated data wired to Livewire.
- Very specific: line 68
If a component must look genuinely different from what props allow, that's a *design-system decision*: wrap it in your own Blade component …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flux UI Patterns
Flux earns its keep when you use components as designed — accessibility, dark mode, and keyboard handling come free. Fight it with overrides and you inherit all that work back.
When to use
- Building Blade/Livewire views in a project that uses Flux UI
- Reviewing UI code for consistency ("half Flux, half hand-rolled divs")
- Converting custom Tailwind markup to Flux components
- "Does Flux have something for this, or do we build it?"
Principles
- Check Flux first, build second. Before hand-rolling any control, check whether a Flux component (or composition of two) covers it. Hand-rolled means hand-rolled a11y, dark mode, and focus management.
- Props before classes. Use
variant,size,iconprops for supported variations. Utility classes on Flux components are for layout (margin, width, grid placement) — not for restyling internals. - The accessibility is in the composition.
flux:field+flux:label+flux:errorwire upfor/ariaautomatically. Skip the wrapper and you silently lose it. - Consistency beats preference. One project, one way to render a form row, a table, an action button.
Process
1. Map the design to components
- Inventory what the page needs: forms, tables, modals, dropdowns, toasts, badges
- For each, find the Flux equivalent; in elyra, verify against the live index with
flux_component_indexrather than memory — APIs move - No match? Compose primitives (
flux:dropdown+flux:navlist,flux:modal+ form) before writing custom markup
2. Forms — the standard recipe
<flux:field>
<flux:label>Email</flux:label>
<flux:input wire:model.blur="form.email" type="email" />
<flux:error name="form.email" />
</flux:field>- Every input gets the field/label/error wrapper — that's where the a11y wiring lives
wire:modelgranularity perlivewire-component-design(deferred by default,.blurfor validate-on-blur)- Shorthand props (e.g.
label="Email"directly on input) are fine — pick one style per project and stick to it
3. Actions and feedback
- Buttons:
variantprop (primary,danger,ghost, …) — one primary action per view region - Destructive flows:
flux:modalconfirmation, danger variant on the confirming button - After Livewire actions: toast via Flux's toast component, triggered from the component — not inline status divs
4. Tables and lists
- Use Flux's table for sortable/paginated data wired to Livewire; keep row actions in a trailing dropdown
- Empty states: design them explicitly — a bare "No results." row is a design hole
5. Theming — variables, not overrides
- Customize via the documented CSS variables / Tailwind config (accent color, radius) so all components shift together
- Dark mode: Flux handles it per component — your job is to not break it with hard-coded
bg-white/text-blackin surrounding layout - If a component must look genuinely different from what props allow, that's a design-system decision: wrap it in your own Blade component once (
<x-app.stat-card>), don't sprinkle the same six utilities across twelve views
6. Review pass
# Smell: raw form controls in a Flux project
grep -rn "<input\|<select\|<button" resources/views --include="*.blade.php" | grep -v "flux:"- Mixed Flux/hand-rolled controls in the same view → converge
- Repeated identical class-soup on Flux components → extract a wrapper component
- In elyra:
blade_to_fluxsuggests conversions;design_system_checkcatches consistency drift
Output format
## Flux review: <view/feature>
### Component mapping
| UI need | Used | Should be |
|---------|------|-----------|
| date input | raw `<input type="date">` | `flux:input type="date"` |
### Consistency findings
1. <view:line> — <issue> → <fix>
### Extracted wrappers
- `<x-app.…>` for <repeated pattern> (used N places)
### Theming
Variables touched: … | hard-coded colors found: …Anti-patterns
- ❌ Hand-rolling a dropdown/modal/toast that Flux ships — and losing keyboard + a11y behavior
- ❌ Restyling component internals with utility classes instead of variants/props/variables
- ❌ Inputs without the
field/label/errorcomposition — looks fine, fails screen readers - ❌
bg-white dark:bg-zinc-900hand-managed on every container while Flux handles its own — drift guaranteed - ❌ Three different button styles for the same action across views
- ❌ Writing Flux component code from memory instead of checking the current component API
- ❌ One-off wrapper divs with the same 8 classes pasted in 12 views — extract the Blade component
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

