Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Chakra Ui V3

БесплатноБез исполняемых скриптовНе проверен

Chakra UI v3 reference — createSystem, tokens, semantic tokens, recipes, slot recipes, color mode, v2 migration, and how a design style maps onto a Chakra…

TheLobbiот TheLobbi★ 22 звезды на GitHub

Об этом скилле

Chakra UI v3 Skill

Single source of truth for Chakra UI v3 in this plugin. Every other skill, command, and agent that emits Chakra code must follow this file. Verified against the official docs (docs header showed 3.37.0, Node.js 20+ required) on 2026-10-21.

Chakra v3 is a total rewrite of the v2 API. Never emit v2 patterns (see "v2 → v3 banned list").

Install and bootstrap

npm i @chakra-ui/react @emotion/react
npx @chakra-ui/cli snippet add        # generates components/ui/* incl. provider.tsx
npx @chakra-ui/cli snippet add color-mode

tsconfig.json: "moduleResolution": "Bundler", "module": "ESNext", "skipLibCheck": true, and "paths": { "@/*": ["./src/*"] }.

Wrap the app root with the generated provider:

import { Provider } from "@/components/ui/provider"
// <Provider>{children}</Provider>

The generated Provider composes ChakraProvider (styling) and ThemeProvider from next-themes (color mode).

The system: createSystem + defineConfig

All customization is one config merged over defaultConfig. Token values are always wrapped in { value: ... }.

// theme.ts
import { createSystem, defaultConfig, defineConfig } from "@chakra-ui/react"

const config = defineConfig({
  theme: {
    tokens: {
      colors: {
        brand: {
          500: { value: "tomato" },
        },
      },
    },
  },
})

export const system = createSystem(defaultConfig, config)
// provider.tsx
import { ChakraProvider } from "@chakra-ui/react"
import { ThemeProvider } from "next-themes"
import { system } from "@/theme"

export function Provider(props: { children: React.ReactNode }) {
  return (
    <ChakraProvider value={system}>
      <ThemeProvider attribute="class">{props.children}</ThemeProvider>
    </ChakraProvider>
  )
}
  • defaultConfig = built-in tokens + recipes. defaultBaseConfig = only conditions and style properties.
  • preflight: false in createSystem replaces v2 resetCss={false}.
  • After editing the config, regenerate prop types: npx @chakra-ui/cli typegen ./theme.ts.

Semantic tokens (light/dark)

Reference another token with {colors.x}. Use base for the default value and _dark for dark mode. Conditions in semantic tokens must be an at-rule or parent-selector condition.

const config = defineConfig({
  theme: {
    semanticTokens: {
      colors: {
        danger: {
          value: { base: "{colors.red.500}", _dark: "{colors.red.700}" },
        },
      },
    },
  },
})

The colorPalette contract

A custom color works with colorPalette only if it defines 50–950 raw tokens and these semantic keys:

semanticTokens: {
  colors: {
    brand: {
      solid:      { value: "{colors.brand.500}" },
      contrast:   { value: "{colors.brand.100}" },
      fg:         { value: "{colors.brand.700}" },
      muted:      { value: "{colors.brand.100}" },
      subtle:     { value: "{colors.brand.200}" },
      emphasized: { value: "{colors.brand.300}" },
      focusRing:  { value: "{colors.brand.500}" },
    },
  },
}

Consume it: <Button colorPalette="brand"> or <Box bg="brand.solid" color="brand.contrast">. For dark mode, give each semantic key { base, _dark } values and verify contrast in both modes.

Recipes and slot recipes

styleConfig/multiStyleConfig from v2 are replaced by recipes (single element) and slot recipes (multi-part). Base styles key is base (not baseStyle).

Extend a built-in recipe (adds an xl Button size):

import { defineRecipe, defineConfig, createSystem, defaultConfig } from "@chakra-ui/react"

const buttonRecipe = defineRecipe({
  variants: { size: { xl: { fontSize: "lg", px: 6, py: 3 } } },
})

const customConfig = defineConfig({
  theme: { recipes: { button: buttonRecipe } },
})
export const system = createSystem(defaultConfig, customConfig)

Extend a built-in slot recipe (alertAnatomy.keys() supplies the slot names):

import { defineSlotRecipe } from "@chakra-ui/react"
import { alertAnatomy } from "@chakra-ui/react/anatomy"

const alertSlotRecipe = defineSlotRecipe({
  slots: alertAnatomy.keys(),
  variants: { size: { xl: { root: { fontSize: "lg", px: 6, py: 3 } } } },
})
// theme: { slotRecipes: { alert: alertSlotRecipe } }

A brand-new multi-part component:

import { defineSlotRecipe } from "@chakra-ui/react"

const navbarSlotRecipe = defineSlotRecipe({
  slots: ["root", "badge", "icon"],
  base: {
    root: { bg: "blue.500", color: "white", px: 4, py: 2 },
    badge: { borderRadius: "full", px: 2, py: 1 },
  },
})
// theme: { slotRecipes: { navbar: navbarSlotRecipe } }
import { Box, useSlotRecipe } from "@chakra-ui/react"

const Navbar = (props) => {
  const recipe = useSlotRecipe({ key: "navbar" })
  const styles = recipe()
  return (
    <Box css={styles.root}>
      {props.children}
      <Box css={styles.badge} />
      <Box css={styles.icon} />
    </Box>
  )
}

Recipe fields: base, variants, `

Полный SKILL.md на GitHub

Установить Chakra Ui V3 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Glob
Grep
Bash

FAQ

Что делает скилл Chakra Ui V3?

Chakra UI v3 reference — createSystem, tokens, semantic tokens, recipes, slot recipes, color mode, v2 migration, and how a design style maps onto a Chakra system

Как установить скилл Chakra Ui V3?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Chakra Ui V3 запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Chakra Ui V3 с