heroui-theming
БесплатноЗапускает вложенные скриптыНе проверенGlobally customize HeroUI v3 and author complete custom themes with CSS only. Use when restyling HeroUI components app-wide, changing design tokens (colors…
от heroui-inc★ 31 344 звезды на GitHubОб этом скилле
HeroUI v3 Theming Guide
HeroUI's look lives entirely in @heroui/styles: plain CSS made of theme tokens and BEM component classes in cascade layers. @heroui/react only adds behavior and puts those class names on the DOM. So everything visual can be changed globally with CSS — no component wrappers, no forks, no JavaScript — and the same CSS works on any framework or plain HTML.
Use this skill to customize HeroUI globally or to build a full theme. For building UIs with the components, use the heroui-react skill.
Installation
curl -fsSL https://heroui.com/install | bash -s heroui-theming
Mental Model
@layer theme, base, components, utilities; ← declared by @heroui/styles
theme tokens --accent, --radius, --surface-shadow, --field-border…
base resets border color, overlay keyframes
components BEM classes .button, .button--primary, .card__header, .switch__thumb…
utilities Tailwind bg-accent, rounded-xl, shadow-surface, status-focused…
- Later layers win over earlier ones regardless of selector specificity. Unlayered CSS beats every layer.
- One chain connects everything: token
--accent→ Tailwind mapping--color-accent: var(--accent)→ utilitybg-accent→ component.button--primary { --button-bg: var(--accent) }. Change the token and the whole chain follows. - Colors without a suffix are backgrounds;
-foregroundis the text placed on them. They change as a pair. - Default light tokens apply on
:root,.light,[data-theme="light"]; dark on.dark,[data-theme="dark"].
Always Inspect the Installed Version First
Never invent a token, class, or selector. Read them from the project's own node_modules (no network needed):
node scripts/list_tokens.mjs # tokens: shared, light, dark, Tailwind mapping
node scripts/list_component_classes.mjs # every component stylesheet
node scripts/list_component_classes.mjs button switch # blocks, elements, modifiers, states, custom properties, tokens read
node scripts/list_component_classes.mjs modal --css # plus the raw CSS
scripts/ is this skill's folder. Run the scripts with the project root as the working directory — they resolve @heroui/styles from there — or pass --dir <path-to>/node_modules/@heroui/styles. The files they read:
| What | Path in the installed package |
|---|---|
| Token values | node_modules/@heroui/styles/dist/themes/default/variables.css |
| Tailwind mapping | node_modules/@heroui/styles/dist/themes/shared/theme.css |
| Component CSS | node_modules/@heroui/styles/dist/components/<name>.css |
Read only. Never edit node_modules.
Decision Ladder
Use the lowest rung that solves the request. Each rung up costs more to maintain.
| # | The request sounds like | Use | Reference |
|---|---|---|---|
| 1 | "Change the brand color / make everything rounder / flatter" | Theme tokens | tokens.md |
| 2 | "Primary buttons should be black" (one component's colors) | That component's custom properties | components.md |
| 3 | "All buttons uppercase / cards get a border" (shape, type, layout, states) | BEM override in @layer components |
components.md |
| 4 | "Add a gradient button next to the existing ones" | New modifier class | components.md |
| 5 | "Create a theme called X" / a full visual identity with light + dark | Named theme folder | theme-recipe.md |
| 6 | "Use preset X but in our colors" (a theme someone else wrote) | Brand palette layered over it | theme-recipe.md |
A one-off tweak on a single element is not theming: use className utilities there.
All snippets below go in the app's main CSS file, after the HeroUI import:
@import "tailwindcss";
@import "@heroui/styles";
/* customizations here */
1. Theme tokens
@layer theme {
/* Same in both modes */
:root {
--accent: oklch(0.55 0.2 300);
--accent-foreground: var(--snow);
--radius: 0.375rem;
}
/* Mode-specific tokens need BOTH blocks, light first */
:root,
.light,
[data-theme="light"] {
--background: oklch(0.98 0.01 300);
}
.dark,
[data-theme="dark"] {
Установить heroui-theming в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл heroui-theming?
Globally customize HeroUI v3 and author complete custom themes with CSS only. Use when restyling HeroUI components app-wide, changing design tokens (colors, radius, shadows, fields), overriding BEM component classes, adding variants, creating a named light/dark theme, or using @heroui/styles on plain HTML and non-React frameworks. Keywords: HeroUI theme, theming, custom theme, design tokens, CSS variables, oklch, BEM, data-theme, dark mode, @heroui/styles, global styles.
Как установить скилл heroui-theming?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл heroui-theming запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic