ワンクリックで
kiso
// Build UIs with Kiso — accessible Rails UI components with Tailwind CSS theming. Use when creating interfaces, customizing themes, building forms, or composing page layouts in Rails + Hotwire apps.
// Build UIs with Kiso — accessible Rails UI components with Tailwind CSS theming. Use when creating interfaces, customizing themes, building forms, or composing page layouts in Rails + Hotwire apps.
Kiso component conventions and development workflow. Points to the right docs for building, reviewing, and shipping components.
Audit all documentation for staleness after code changes. Checks docs site, CLAUDE.md, skills references, contributing skill, agents, and project/ files. Use after completing a feature, merging a PR, or when asked to check docs.
Guide through releasing a new version of kiso. Use when cutting a release, publishing a new version, or running bin/release.
Build a Kiso component from scratch. Reads shadcn/Nuxt UI sources, creates theme module, ERB partials, Lookbook previews, docs, E2E tests. Use when building a new component or picking up where a previous attempt left off.
Review a Kiso component for quality and consistency. Runs the 12-point checklist against shadcn source, design system rules, and deliverables. Use on a PR, branch, or working directory.
Agentic Component Factory — build multiple Kiso components in parallel using builder and reviewer agents in isolated worktrees. Usage: /factory #47 #48 or /factory #47 #48 #49 (pass issue numbers)
| name | kiso |
| description | Build UIs with Kiso — accessible Rails UI components with Tailwind CSS theming. Use when creating interfaces, customizing themes, building forms, or composing page layouts in Rails + Hotwire apps. |
Rails component library built on ERB partials + Tailwind CSS + class_variants + tailwind_merge. Inspired by shadcn/ui and Nuxt UI, adapted for Rails + Hotwire.
# Gemfile
gem "kiso"
bundle install
bin/rails generate kiso:install
Use the kui() helper to render components:
<%= kui(:badge, color: :success, variant: :soft) { "Active" } %>
<%= kui(:card) do %>
<%= kui(:card, :header) do %>
<%= kui(:card, :title, text: "Members") %>
<% end %>
<%= kui(:card, :content) do %>
...
<% end %>
<% end %>
7 semantic colors configurable via theme CSS variables:
| Color | Default Palette | Purpose |
|---|---|---|
primary | blue | CTAs, brand, active states |
secondary | teal | Secondary actions |
success | green | Success messages |
info | sky | Informational |
warning | amber | Warnings |
error | red | Errors, destructive actions |
neutral | zinc | Text, borders, surfaces |
Components that accept both color and variant use compound variants (Nuxt UI pattern):
| Variant | Style |
|---|---|
solid | Filled background, contrasting text |
outline | Transparent background, colored ring |
soft | Light tinted background, colored text |
subtle | Light tinted background, colored text, faint ring |
Components use semantic Tailwind utilities (bg-primary, text-foreground, bg-muted) that resolve to CSS variables. Dark mode flips automatically — components never use dark: prefixes.
Override brand colors in your app's CSS:
@theme inline {
--color-primary: var(--color-orange-600);
--color-primary-foreground: white;
}
Override all instances of a component via Kiso.configure in an initializer:
# config/initializers/kiso.rb
Kiso.configure do |config|
config.theme[:button] = { base: "rounded-full", defaults: { variant: :outline } }
config.theme[:card_header] = { base: "p-8 sm:p-10" }
end
Override hashes accept base:, variants:, compound_variants:, defaults:. Applied once at boot — zero per-render cost.
Pass css_classes: to override styles on a specific instance. Conflicting classes are resolved automatically via tailwind_merge:
<%= kui(:badge, color: :primary, css_classes: "rounded-full px-4") { "Custom" } %>
Layer order: theme default < global config < per-instance css_classes:.
Kiso uses kiso-icons for server-side inline SVG rendering. Lucide (~1500 icons) is bundled and works out of the box:
<%= kiso_icon("check") %>
<%= kiso_icon("settings", size: :md) %>
<%= kiso_icon("heroicons:check-circle") %> <%# from a pinned set %>
Add more icon libraries:
bin/kiso-icons pin heroicons mdi tabler
Override component default icons globally:
Kiso.configure do |config|
config.icons[:chevron_right] = "heroicons:chevron-right"
config.icons[:menu] = "heroicons:bars-3"
end
Load based on your task — do not load all at once: