/maquina-ui-standards:uifrom maquina-ui-standards
Build consistent, accessible UIs in Rails using maquina_components with Tailwind CSS 4 and data-attribute styling. Covers composition, semantic variants, helpers, inline errors, zero states, and icons.
Ships in maquina-ui-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Build production-quality Rails UIs with maquina_components — ERB partials styled with Tailwind CSS 4 and data attributes, inspired by shadcn/ui.
Verified against maquina-components 0.7.0. Upgrading an app from 0.5.x? Read upgrading-0.6.md first — 0.6.0 changed behavior silently. 0.7.0 broke nothing, but it deprecated
collapse_afteronresponsive_breadcrumbsand fixed focus-ring timing; never transitionoutline-colorin a component of your own.
Official documentation: https://maquina.app/documentation/components/
data-component / data-*-part attributes; the engine CSS handles appearance. Reach for a variant or a role token first, and use Tailwind utilities for layout — grids, spacing, placement.@layer components flattened to specificity 0,1,0, so a utility passed as css_classes: applies. That makes rule 2 a convention you keep, not a mechanism that keeps itself: an unintended utility silently reshapes the component.:success, :warning, :destructive), one mapping per status domain. The danger variant is :destructive everywhere; sizes are :sm / :default / :lg (badge's middle size is :md; both accept the other's name as an alias). This vocabulary is canonical — the catalog defers to it.dropdown_menu, combobox, toggle_group, simple_table, pagination_nav (Pagy), empty_state, toast_flash_messages, breadcrumbs. Use _simple variants for data-driven one-liners, block builders for custom content, partials for structural components (Card, Alert, Badge, Sidebar, Drawer).data-form-part="error"), with a brief flash summary. Complete inputs: every field carries type, required, maxlength, autocomplete, and inputmode where they apply.empty_state (or empty_search_state / empty_list_state) when the collection is empty.icon_for — one icon system, delegating to the app's main_icon_svg_for override with built-in SVG fallbacks. Under strict_icons (on by default in development and test) an unresolvable name raises MaquinaComponents::UnknownIconError, so use a name from the roster in installation-guide.md.--surface-radius, --elevation-overlay, --focus-ring-width) to restyle a whole class of component, and a per-component escape hatch (--card-radius, --toast-shadow) to pin exactly one. A theme changes values, not selectors. One accent color moment per screen; neutrals elsewhere.| Need | Component | Helper |
|---|---|---|
| Container with header/content/footer | Card | — |
| Important message | Alert | — |
| Status indicator | Badge | — |
| Data display | Table | simple_table |
| Zero-data state | Empty | empty_state |
| Actions menu | Dropdown Menu | dropdown_menu / dropdown_menu_simple |
| Option selection | Toggle Group | toggle_group_simple |
| Page location | Breadcrumbs | breadcrumbs / responsive_breadcrumbs |
| Paginated collections | Pagination | pagination_nav (Pagy) |
| App navigation | Sidebar | — |
| Slide-out panel | Drawer | drawer_state / drawer_open? |
| Form inputs and labels | Form components (data attributes), Label | — |
| Inline date selection | Calendar | — |
| Date input field | Date Picker | — |
| Searchable selection | Combobox | combobox / combobox_simple |
| Temporary feedback | Toast | toast_flash_messages, toast_success … |
| Dashboard metrics | Stats | — |
| Content divider | Separator | — |
Every partial accepts css_classes: (additional classes — these apply, see rule 3) and **html_options (id, aria, data, title — any HTML attribute).
text: for strings or content: for captured HTML, with a block as fallback.data: merges with the component's. The component wins only its identity keys — component, variant, size, and any key ending in _part/-part. controller and action concatenate (component tokens first), so data: { controller: "analytics" } on a combobox renders data-controller="combobox analytics". You win every other key. The merged hash is compacted: nil emits no attribute, false still renders "false".<%= render "components/card", id: "profile", data: { controller: "collapsible" } do %>
<%= render "components/card/header" do %>
<%= render "components/card/title", text: @user.name %>
<% end %>
<% end %>
<%= f.email_field :email, data: { component: "input" },
required: true, maxlength: 254, autocomplete: "email" %>
<%= f.submit "Save", data: { component: "button", variant: "primary" } %>
Before marking a screen complete: every list renders its empty state, one accent moment per screen with neutrals elsewhere, and bin/rails maquina:doctor reports nothing at BREAKING severity. spec-checklist.md carries the full pass.
bin/rails maquina:doctor.| Read | When |
|---|---|
| component-catalog.md | Rendering any component — props, variants, composition examples |
| helpers-reference.md | Using builder helpers or _simple methods |
| form-patterns.md | Building or reviewing forms |
| layout-patterns.md | Page structure, grids, responsive design |
| turbo-integration.md | Frames, Streams, or morph interacting with components |
| stimulus-controllers.md | Extending or debugging component JavaScript |
| installation-guide.md | Setup, theme tokens, icon roster, maquina:doctor |
| upgrading-0.6.md | Moving an app from 0.5.x, or a component looks subtly wrong after an upgrade |
| spec-checklist.md | Final verification before completion |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub maquina-app/rails-claude-code --plugin maquina-ui-standardsOther plugins' skills for the same job