Instruction file imported from indielayer/ui (
.cursor/rules/themes.mdc). Copyright stays with the author.
description: Component theme files (shipped variants: base, carbon) globs: packages/ui/**/*.theme.ts alwaysApply: false
Themes
- Every styled component needs a
*.<id>.theme.tsfor each shipped theme (currentlybase,carbon) - Import
*Themetype from the sibling.vuefile classeskeys map to template slots/elements; use function form({ props, slots, data }) => [...]stylesusescolors.getPalette(),css(), and CSS variables — followButton.base.theme.ts- Export default theme object; register in every
themes/<id>/components.tswith matching key name - Global theme entries:
packages/ui/src/themes/<id>/index.ts(classPrefix: 'x-') - New shipped theme pack:
.cursor/skills/add-theme/SKILL.md
When changing one theme variant, check whether the others need the same logical change.
Reference: packages/ui/src/components/button/theme/Button.base.theme.ts