커스텀 테마

앱 브랜드에 맞게 토큰을 바꿔 나만의 테마를 만드는 방법

앱의 브랜드에 맞게 DS의 색·모서리·글꼴 같은 토큰 값을 변경해 커스텀 테마를 정의합니다. 변경한 토큰만 달라지고 나머지는 DS 기본값(mildang 테마)을 그대로 사용하며, 컴포넌트의 사용법(prop)·동작·접근성은 바뀌지 않습니다.

개요

토큰 값을 바꾸는 방법은 사용하는 스타일 경로에 따라 다릅니다.

변경한 값은 해당 토큰을 사용하는 모든 곳에 적용됩니다. DS 컴포넌트뿐 아니라 앱 CSS의 var(--ids-…), Tailwind 연결 클래스(bg-primary-fill-base 등)에도 함께 적용됩니다. 테마로 변경할 수 없는 항목은 제한 사항을 참고하세요.

defineTheme으로 테마 정의

defineTheme은 런타임에 적용할 토큰 전용 CSS를 반환합니다. Panda config나 컴포넌트 recipe를 변경하지 않습니다. Panda v2가 앱 CSS를 생성할 때 토큰과 recipe를 함께 정의하려면 아래 Panda 빌드 테마를 사용하세요.

테마 정의

defineTheme에 변경할 토큰만 지정합니다.

tsx

// app/theme.ts
import { defineTheme } from '@mildang/design-system/theme';

export const customTheme = defineTheme({
  name: 'my-brand',
  tokens: {
    colors: {
      'primary.fill.base': '#e11d48',
      'primary.text.base': '#be123c',
      'primary.icon.base': '#be123c',
      'primary.border.base': '#fda4af',
    },
    radii: { '8': '10px' },
  },
});
  • 키는 토큰 문서와 컴포넌트 prop에서 사용하는 이름과 같습니다(colors의 primary.fill.base, radii의 8). 공개 토큰만 지정할 수 있고 에디터에서 자동완성됩니다. 존재하지 않는 이름은 타입 오류가 발생합니다.
  • 이름(name)에는 앱이나 브랜드 이름을 지정합니다. <html>의 data-panda-theme 속성 값으로 사용하며, 소문자로 시작하고 소문자·숫자·-만 사용할 수 있습니다. educore 같은 제품별 테마 이름은 사용할 수 없습니다.
  • 반환값은 { name, css }입니다. Provider 없이 CSS 문자열과 속성만으로 적용합니다.

테마 적용

반환된 CSS를 <style> 요소로 추가하고, <html> 요소에 data-panda-theme 속성을 지정합니다. styles.css는 기존과 같이 앱 진입점에서 import합니다.

Next.js App Router (서버 컴포넌트에서 사용할 수 있습니다)

tsx

// app/layout.tsx
import '@mildang/design-system/styles.css';
import { customTheme } from './theme';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="ko" data-panda-theme={customTheme.name}>
      <head>
        <style>{customTheme.css}</style>
      </head>
      <body>{children}</body>
    </html>
  );
}

Vite 등 SPA

tsx

// main.tsx
import '@mildang/design-system/styles.css';
import { customTheme } from './theme';

const style = document.createElement('style');
style.textContent = customTheme.css;
document.head.append(style);
document.documentElement.setAttribute('data-panda-theme', customTheme.name);
  • 테마는 <html> 요소에 적용합니다. 버튼 배경 같은 컴포넌트 값은 문서 최상위에서 primary.fill.base 같은 토큰을 참조하므로, 같은 요소에서 값을 변경해야 함께 반영됩니다. <body>나 하위 요소에 지정하면 적용되지 않습니다.
  • Dialog·Toast처럼 <body> 바로 아래에 렌더링되는 오버레이에도 적용됩니다.
  • 반환된 CSS는 DS 레이어(ids) 안에 있으므로 DS 기본값보다 우선하고, 앱의 레이어 밖 CSS보다는 우선순위가 낮습니다.

다크 모드

다크 모드는 <html> 요소에 .dark 클래스를 지정해 사용합니다. 값을 하나만 지정하면 라이트와 다크에 같은 값이 적용됩니다. 색은 [라이트, 다크]로 지정하면 다크 모드에서 다른 값을 사용합니다.

tsx

defineTheme({
  name: 'my-brand',
  tokens: {
    colors: {
      'primary.fill.base': ['#4f46e5', '#a5b4fc'],    // 라이트, 다크
      'neutral.surface.low': ['#f8f9ff', '#12131a'],
    },
    radii: { '8': '12px' },                            // 두 모드 공통
  },
});

html

<html data-panda-theme="my-brand" class="dark">
  • [라이트, 다크]는 색(colors)에만 사용할 수 있습니다. 간격·모서리·글꼴 같은 값은 모드를 바꿔도 화면 구조가 달라지지 않도록 두 모드에 같은 값을 사용합니다.
  • 다크 모드를 사용하는 앱에서는 글자·면·테두리 색을 [라이트, 다크]로 지정하세요. 값을 하나만 지정한 색은 다크 모드에서도 같은 색이므로, 밝은 면이나 어두운 글자가 다크 화면에 그대로 남습니다.
  • 기본 버튼의 글자는 다크 모드에서 어두운 색입니다(inverse.text.base). 다크 모드의 primary.fill.base에는 밝은 색을 지정해야 글자가 잘 보입니다.
  • 지정하지 않은 토큰은 다크 모드에서 DS 다크 값을 사용합니다.

Panda 빌드 테마

외부 Panda v2 앱은 공개 @mildang/design-system/panda-config API로 사용자 테마를 정의하고 DS recipe 확장을 타입 검사할 수 있습니다. defineProductTheme의 recipe 이름·slot·variant 축과 값은 공통 DS recipe registry를 따릅니다. 설정된 테마는 staticCss.themes에 포함되므로 앱 CSS 생성 시 규칙이 만들어집니다.

compoundVariants는 원본 recipe에 존재하는 선택 조합의 스타일을 변경할 수 있습니다. 새 조합을 추가하면 빌드 오류가 발생합니다.

ts

// panda.config.ts
import { defineConfig } from '@pandacss/dev';
import { defineProductTheme, withProductThemeRecipes } from '@mildang/design-system/panda-config';

const appTheme = defineProductTheme({
  tokens: {
    colors: { appBrand: { 500: { value: '{colors.blue.light.900}' } } },
  },
  semanticTokens: {
    colors: {
      primary: { fill: { base: { value: '{colors.appBrand.500}' } } },
    },
  },
  slotRecipes: {
    buttonBase: {
      variants: { size: { sm: { root: { borderRadius: '12' } } } },
    },
    buttonV2: {
      variants: { variant: { primary: { root: { fontWeight: 'semibold' } } } },
    },
    input: {
      variants: { size: { md: { inputContainer: { borderRadius: '8' } } } },
    },
    textArea: {
      variants: { size: { md: { textAreaContainer: { borderRadius: '8' } } } },
    },
  },
});

export default withProductThemeRecipes(
  defineConfig({ designSystem: '@mildang/design-system' }),
  { themes: { 'my-app': appTheme } },
);

테마는 data-panda-theme을 지정한 요소와 그 하위에 적용됩니다. 페이지 전체에 적용하거나, 한 화면에서 다른 테마를 가진 영역을 나란히 둘 수 있습니다.

tsx

<main>
  <section data-panda-theme="my-app">내 앱 테마가 적용되는 영역</section>
  <section data-panda-theme="another-app">다른 테마가 적용되는 영역</section>
</main>

사용자 테마는 DS 기본값을 바탕으로 토큰을 병합합니다. extends, componentTokens, keyframes 같은 제품 preset 내부 필드는 공개 API에 포함되지 않습니다. 테마 이름은 my-app처럼 소문자 kebab-case를 사용하며, 내장 제품 테마 이름과 겹칠 수 없습니다. 이 API는 알려진 recipe 이름·slot·variant 축·값을 검사하지만, Panda 토큰 경로가 실제로 존재하는지까지 검사하지는 않습니다. 토큰 경로는 DS 토큰 목록에서 확인하세요. 아래 제한 사항은 런타임 defineTheme 및 CSS 변수 방식에 대한 내용이며, Panda 빌드 테마에는 적용되지 않습니다. 이미 생성된 DS CSS에 토큰만 적용하려면 이 API 대신 defineTheme을 사용하세요.

CSS 변수로 토큰 값 변경

일부 토큰만 변경할 때는 :root(<html>)에 CSS 변수를 직접 지정합니다. 변수 이름은 토큰 페이지에서 복사할 수 있습니다.

css

:root {
  --ids-colors-primary-fill-base: #e11d48;
}
  • :root에 지정합니다. <body>나 하위 요소에 지정하면 토큰을 직접 사용하는 곳만 바뀌고 컴포넌트 색은 바뀌지 않습니다(테마 적용과 같은 이유입니다).
  • 다크 모드에서도 같은 값을 사용합니다. 라이트 모드에만 적용하려면 :root:not(.dark)처럼 .dark를 제외합니다.
  • 이 CSS는 @layer 밖에 둡니다. DS 토큰은 ids 레이어에 있으므로 레이어 밖 CSS가 항상 우선합니다.
  • 제품별 테마를 적용한 경우에는 data-panda-theme 속성을 지정한 요소에 변수를 지정합니다. 테마 CSS 파일이 해당 요소에서 컴포넌트 값까지 다시 정의하기 때문입니다.

주요 토큰

두 방법 모두 같은 토큰을 변경합니다.

변경 대상토큰
브랜드 색(주요 버튼, 강조 글자·아이콘)primary.fill.base, primary.text.base, primary.icon.base, primary.border.base·high·highest, primary.surface.base·high
글자 색neutral.text.base·low·lowest
배경·면neutral.surface.low·base·high·highest
테두리·구분선neutral.border.low·base·high·highest
모서리radii의 4·8·12·16 등
글꼴fonts의 default(본문)·title(제목). 글꼴 파일은 앱에서 로드합니다.

변경 가능한 토큰 전체와 기본값은 아래 변경 가능한 토큰 목록에서 확인할 수 있습니다. Typography의 body-md 같은 글자 스타일은 글꼴·크기·줄 높이를 묶은 이름이라 설정 키로 사용할 수 없습니다. fontSizes·lineHeights 등을 각각 변경하세요. 브랜드 색을 변경할 때는 primary.* 토큰을 함께 변경하세요. primary.fill.base만 변경하면 테두리·글자 색과 어울리지 않을 수 있습니다.

변경 가능한 토큰 목록

이 목록은 pnpm gen:theme-tokens가 defineTheme이 받는 토큰과 같은 원본에서 생성합니다. 직접 수정하지 마세요.

defineTheme의 tokens에 범주와 키를 그대로 사용합니다. CSS 변수로 바꿀 때는 CSS 변수 열의 이름을 사용합니다. 기본값은 기본 테마의 라이트 모드 값입니다. 기본 16px · sm 24px처럼 화면 폭별 값이 있는 토큰을 값 하나로 변경하면 모든 화면 폭에 같은 값이 적용됩니다.

색 (colors) · 300개

설정 예: tokens: { colors: { 'primary.surface.base': '…' } }

키CSS 변수기본값
primary.surface.basergba(250, 251, 252, 1)
primary.surface.highrgba(245, 246, 248, 1)
primary.border.basergba(226, 228, 234, 1)
primary.border.highrgba(203, 207, 216, 1)
primary.border.highestrgba(30, 32, 36, 1)
primary.fill.basergba(30, 32, 36, 1)
primary.icon.basergba(30, 32, 36, 1)
primary.text.basergba(30, 32, 36, 1)
neutral.surface.lowrgba(254, 254, 254, 1)
neutral.surface.basergba(250, 251, 252, 1)
neutral.surface.highrgba(245, 246, 248, 1)
neutral.surface.highestrgba(237, 238, 242, 1)
neutral.surface.transparentrgba(255, 255, 255, 0.00)
neutral.fill.basergba(203, 207, 216, 1)
neutral.fill.highrgba(30, 32, 36, 1)
neutral.icon.lowrgba(203, 207, 216, 1)
neutral.icon.basergba(116, 123, 139, 1)
neutral.border.lowrgba(237, 238, 242, 1)
neutral.border.basergba(226, 228, 234, 1)
neutral.border.highrgba(203, 207, 216, 1)
neutral.border.highestrgba(30, 32, 36, 1)
neutral.text.lowestrgba(107, 113, 128, 1)
neutral.text.lowrgba(79, 84, 95, 1)
neutral.text.basergba(30, 32, 36, 1)
neutral.ghostBg.basergba(30, 32, 36, 0.06)
neutral.ghostBg.highrgba(30, 32, 36, 0.09)
neutral.ghostBg.highestrgba(30, 32, 36, 0.12)
inverse.bg.basergba(255, 255, 255, 1)
inverse.text.basergba(255, 255, 255, 1)
inverse.icon.basergba(255, 255, 255, 1)
warning.surface.basergba(255, 246, 240, 1)
warning.surface.highrgba(255, 240, 229, 1)
warning.border.basergba(255, 203, 169, 1)
warning.border.highrgba(255, 185, 138, 1)
warning.border.highestrgba(242, 98, 2, 1)
warning.fill.basergba(242, 98, 2, 1)
warning.icon.basergba(254, 133, 52, 1)
warning.ghostBg.basergba(242, 98, 2, 0.06)
warning.ghostBg.highrgba(242, 98, 2, 0.09)
warning.ghostBg.highestrgba(242, 98, 2, 0.12)
warning.text.basergba(189, 75, 0, 1)
info.surface.basergba(240, 248, 255, 1)
info.surface.highrgba(228, 243, 255, 1)
info.border.basergba(173, 220, 255, 1)
info.border.highrgba(138, 204, 255, 1)
info.border.highestrgba(0, 145, 255, 1)
info.fill.basergba(0, 145, 255, 1)
info.icon.basergba(0, 145, 255, 1)
info.ghostBg.basergba(0, 145, 255, 0.06)
info.ghostBg.highrgba(0, 145, 255, 0.09)
info.ghostBg.highestrgba(0, 145, 255, 0.12)
info.text.basergba(0, 105, 224, 1)
positive.surface.lowrgba(246, 252, 249, 1)
positive.surface.basergba(239, 250, 245, 1)
positive.surface.highrgba(225, 244, 236, 1)
positive.border.basergba(172, 226, 203, 1)
positive.border.highrgba(144, 218, 187, 1)
positive.border.highestrgba(42, 162, 112, 1)
positive.fill.basergba(42, 162, 112, 1)
positive.icon.basergba(42, 162, 112, 1)
positive.ghostBg.basergba(42, 162, 112, 0.06)
positive.ghostBg.highrgba(42, 162, 112, 0.09)
positive.ghostBg.highestrgba(42, 162, 112, 0.12)
positive.text.basergba(28, 125, 85, 1)
critical.surface.basergba(255, 245, 246, 1)
critical.surface.highrgba(255, 235, 236, 1)
critical.border.basergba(255, 194, 199, 1)
critical.border.highrgba(255, 163, 171, 1)
critical.border.highestrgba(251, 81, 95, 1)
critical.fill.basergba(251, 81, 95, 1)
critical.icon.basergba(251, 81, 95, 1)
critical.ghostBg.basergba(251, 81, 95, 0.06)
critical.ghostBg.highrgba(251, 81, 95, 0.09)
critical.ghostBg.highestrgba(251, 81, 95, 0.12)
critical.text.basergba(200, 50, 62, 1)
gradient.primary.stop1rgba(176, 68, 238, 1)
gradient.primary.stop2rgba(73, 80, 223, 1)
gradient.primary.defaultlinear-gradient(135deg, rgba(176, 68, 238, 1) 0%, rgba(73, 80, 223, 1) 100%)
gradient.primary.horizontallinear-gradient(90deg, rgba(176, 68, 238, 1) 0%, rgba(73, 80, 223, 1) 100%)
gradient.primary.verticallinear-gradient(180deg, rgba(176, 68, 238, 1) 0%, rgba(73, 80, 223, 1) 100%)
gradient.glow.stop1#c550ed
gradient.glow.stop2#1f72ef
gradient.secondary.stop1rgba(237, 74, 205, 1)
gradient.secondary.stop2rgba(138, 204, 255, 1)
gradient.secondary.defaultlinear-gradient(135deg, rgba(237, 74, 205, 1) 0%, rgba(138, 204, 255, 1) 100%)
gradient.tertiary.stop1rgba(255, 235, 251, 1)
gradient.tertiary.stop2rgba(199, 230, 255, 1)
gradient.tertiary.defaultlinear-gradient(338deg, rgba(255, 235, 251, 1) 0%, rgba(199, 230, 255, 1) 100%)
gradient.dim.stop1rgba(255, 255, 255, 1)
gradient.dim.stop2rgba(255, 255, 255, 0.00)
gradient.dim.fadeOutLeftlinear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 1) 100%)
gradient.dim.fadeOutRightlinear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 1) 100%)
gradient.dim.fadeOutToplinear-gradient(to top, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 1) 100%)
gradient.dim.fadeOutBottomlinear-gradient(to bottom, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 1) 100%)
onColor.text.basergba(255, 255, 255, 1)
onColor.icon.basergba(255, 255, 255, 1)
shadow.basergba(30, 32, 36, 0.06)
shadow.highrgba(30, 32, 36, 0.09)
shadow.highestrgba(30, 32, 36, 0.12)
shadow.rimLowrgba(255, 255, 255, 0.00)
shadow.rimMedrgba(255, 255, 255, 0.00)
shadow.rimHighrgba(255, 255, 255, 0.00)
chart.blue.100#dbeafe
chart.blue.200#bfdbfe
chart.blue.300#93c5fd
chart.blue.400#60a5fa
chart.blue.500#3b82f6
chart.blue.600#2563eb
chart.blue.700#1d4ed8
chart.blue.800#1e40af
chart.blue.900#1e3a8a
chart.green.100#d1fae5
chart.green.200#a7f3d0
chart.green.300#6ee7b7
chart.green.400#34d399
chart.green.500#10b981
chart.green.600#059669
chart.green.700#047857
chart.green.800#065f46
chart.green.900#064e3b
chart.red.100#fee2e2
chart.red.200#fecaca
chart.red.300#fca5a5
chart.red.400#f87171
chart.red.500#ef4444
chart.red.600#dc2626
chart.red.700#b91c1c
chart.red.800#991b1b
chart.red.900#7f1d1d
chart.orange.100#ffedd5
chart.orange.200#fed7aa
chart.orange.300#fdba74
chart.orange.400#fb923c
chart.orange.500#f97316
chart.orange.600#ea580c
chart.orange.700#c2410c
chart.orange.800#9a3412
chart.orange.900#7c2d12
chart.yellow.100#fef3c7
chart.yellow.200#fde68a
chart.yellow.300#fcd34d
chart.yellow.400#fbbf24
chart.yellow.500#f59e0b
chart.yellow.600#d97706
chart.yellow.700#b45309
chart.yellow.800#92400e
chart.yellow.900#78350f
chart.purple.100#ede9fe
chart.purple.200#ddd6fe
chart.purple.300#c4b5fd
chart.purple.400#a78bfa
chart.purple.500#8b5cf6
chart.purple.600#7c3aed
chart.purple.700#6d28d9
chart.purple.800#5b21b6
chart.purple.900#4c1d95
chart.pink.100#fce7f3
chart.pink.200#fbcfe8
chart.pink.300#f9a8d4
chart.pink.400#f472b6
chart.pink.500#ec4899
chart.pink.600#db2777
chart.pink.700#be185d
chart.pink.800#9d174d
chart.pink.900#831843
chart.lime.100#ecfccb
chart.lime.200#d9f99d
chart.lime.300#bef264
chart.lime.400#a3e635
chart.lime.500#84cc16
chart.lime.600#65a30d
chart.lime.700#4d7c0f
chart.lime.800#3f6212
chart.lime.900#365314
chart.gray.100#f3f4f6
chart.gray.200#e5e7eb
chart.gray.300#d1d5db
chart.gray.400#9ca3af
chart.gray.500#6b7280
chart.gray.600#4b5563
chart.gray.700#374151
chart.gray.800#1f2937
chart.gray.900#111827
chart.cyan.100#cffafe
chart.cyan.200#a5f3fc
chart.cyan.300#67e8f9
chart.cyan.400#22d3ee
chart.cyan.500#06b6d4
chart.cyan.600#0891b2
chart.cyan.700#0e7490
chart.cyan.800#155e75
chart.cyan.900#164e63
chart.fuchsia.100#fae8ff
chart.fuchsia.200#f5d0fe
chart.fuchsia.300#f0abfc
chart.fuchsia.400#e879f9
chart.fuchsia.500#d946ef
chart.fuchsia.600#c026d3
chart.fuchsia.700#a21caf
chart.fuchsia.800#86198f
chart.fuchsia.900#701a75
chart.on.blue.100#111827
chart.on.blue.200#111827
chart.on.blue.300#111827
chart.on.blue.400#111827
chart.on.blue.500#111827
chart.on.blue.600#ffffff
chart.on.blue.700#ffffff
chart.on.blue.800#ffffff
chart.on.blue.900#ffffff
chart.on.green.100#111827
chart.on.green.200#111827
chart.on.green.300#111827
chart.on.green.400#111827
chart.on.green.500#111827
chart.on.green.600#111827
chart.on.green.700#ffffff
chart.on.green.800#ffffff
chart.on.green.900#ffffff
chart.on.red.100#111827
chart.on.red.200#111827
chart.on.red.300#111827
chart.on.red.400#111827
chart.on.red.500#111827
chart.on.red.600#ffffff
chart.on.red.700#ffffff
chart.on.red.800#ffffff
chart.on.red.900#ffffff
chart.on.orange.100#111827
chart.on.orange.200#111827
chart.on.orange.300#111827
chart.on.orange.400#111827
chart.on.orange.500#111827
chart.on.orange.600#111827
chart.on.orange.700#ffffff
chart.on.orange.800#ffffff
chart.on.orange.900#ffffff
chart.on.yellow.100#111827
chart.on.yellow.200#111827
chart.on.yellow.300#111827
chart.on.yellow.400#111827
chart.on.yellow.500#111827
chart.on.yellow.600#111827
chart.on.yellow.700#ffffff
chart.on.yellow.800#ffffff
chart.on.yellow.900#ffffff
chart.on.purple.100#111827
chart.on.purple.200#111827
chart.on.purple.300#111827
chart.on.purple.400#111827
chart.on.purple.500#ffffff
chart.on.purple.600#ffffff
chart.on.purple.700#ffffff
chart.on.purple.800#ffffff
chart.on.purple.900#ffffff
chart.on.pink.100#111827
chart.on.pink.200#111827
chart.on.pink.300#111827
chart.on.pink.400#111827
chart.on.pink.500#111827
chart.on.pink.600#ffffff
chart.on.pink.700#ffffff
chart.on.pink.800#ffffff
chart.on.pink.900#ffffff
chart.on.lime.100#111827
chart.on.lime.200#111827
chart.on.lime.300#111827
chart.on.lime.400#111827
chart.on.lime.500#111827
chart.on.lime.600#111827
chart.on.lime.700#ffffff
chart.on.lime.800#ffffff
chart.on.lime.900#ffffff
chart.on.gray.100#111827
chart.on.gray.200#111827
chart.on.gray.300#111827
chart.on.gray.400#111827
chart.on.gray.500#ffffff
chart.on.gray.600#ffffff
chart.on.gray.700#ffffff
chart.on.gray.800#ffffff
chart.on.gray.900#ffffff
chart.on.cyan.100#111827
chart.on.cyan.200#111827
chart.on.cyan.300#111827
chart.on.cyan.400#111827
chart.on.cyan.500#111827
chart.on.cyan.600#111827
chart.on.cyan.700#ffffff
chart.on.cyan.800#ffffff
chart.on.cyan.900#ffffff
chart.on.fuchsia.100#111827
chart.on.fuchsia.200#111827
chart.on.fuchsia.300#111827
chart.on.fuchsia.400#111827
chart.on.fuchsia.500#111827
chart.on.fuchsia.600#ffffff
chart.on.fuchsia.700#ffffff
chart.on.fuchsia.800#ffffff
chart.on.fuchsia.900#ffffff
글꼴 (fonts) · 6개

설정 예: tokens: { fonts: { 'pretendard': '…' } }

키CSS 변수기본값
pretendardvar(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
lineSeedSansKrvar(--font-line-seed-sans-kr, "LINE Seed Sans KR"), var(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
defaultvar(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
titlevar(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
headlinevar(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
displayvar(--font-pretendard-variable, "Pretendard Variable", Pretendard), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
글자 크기 (fontSizes) · 15개

설정 예: tokens: { fontSizes: { '10': '…' } }

키CSS 변수기본값
100.625rem
110.6875rem
120.75rem
130.8125rem
140.875rem
150.9375rem
161rem
181.125rem
201.25rem
221.375rem
241.5rem
261.625rem
281.75rem
322rem
402.5rem
글자 굵기 (fontWeights) · 7개

설정 예: tokens: { fontWeights: { 'regular': '…' } }

키CSS 변수기본값
regular400
medium500
semibold600
bold700
button.default500
title.default600
title.medium500
줄 높이 (lineHeights) · 15개

설정 예: tokens: { lineHeights: { '18': '…' } }

키CSS 변수기본값
181.125rem
201.25rem
221.375rem
241.5rem
261.625rem
281.75rem
301.875rem
322rem
342.125rem
362.25rem
382.375rem
402.5rem
442.75rem
543.375rem
563.5rem
자간 (letterSpacings) · 11개

설정 예: tokens: { letterSpacings: { '14': '…' } }

키CSS 변수기본값
14-0.0015em
15-0.0025em
16-0.0035em
18-0.0055em
20-0.007em
22-0.0085em
24-0.0095em
26-0.011em
28-0.012em
32-0.0135em
40-0.016em
간격 (spacing) · 23개

설정 예: tokens: { spacing: { '0': '…' } }

키CSS 변수기본값
00px
22px
44px
66px
88px
1010px
1212px
1616px
2020px
2424px
2626px
2828px
3232px
3636px
4040px
4444px
4848px
5656px
6464px
8080px
layout.margin기본 16px · sm 24px
layout.gutter기본 16px · sm 20px · md 24px
-14-14px
크기 (sizes) · 2개

설정 예: tokens: { sizes: { 'content.max': '…' } }

키CSS 변수기본값
content.max기본 400px · sm 720px · md 1140px
topNav.height기본 48px · md 56px
모서리 (radii) · 12개

설정 예: tokens: { radii: { '2': '…' } }

키CSS 변수기본값
22px
44px
66px
88px
1010px
1212px
1616px
2020px
2424px
3232px
3636px
full9999px
그림자 (shadows) · 11개

설정 예: tokens: { shadows: { '1': '…' } }

키CSS 변수기본값
10px 1px 1px -1px rgba(30, 32, 36, 0.12), 0px 1px 2px -1px rgba(30, 32, 36, 0.06), 0px 1px 4px 0px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
20px 2px 3px -2px rgba(30, 32, 36, 0.16), 0px 1px 4px -1px rgba(30, 32, 36, 0.12), 0px 4px 8px 0px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
30px 5px 8px -2px rgba(30, 32, 36, 0.16), 0px 1px 4px -1px rgba(30, 32, 36, 0.06), 0px 6px 16px 0px rgba(30, 32, 36, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
40px 8px 8px -5px rgba(30, 32, 36, 0.09), 0px 12px 20px -1px rgba(30, 32, 36, 0.12), 0px 8px 28px 2px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
50px 12px 12px -8px rgba(30, 32, 36, 0.09), 0px 24px 28px -1px rgba(30, 32, 36, 0.12), 0px 12px 32px 2px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
nonenone
core.10px 1px 4px 0px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
core.20px 2px 8px 0px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
core.30px 4px 16px 0px rgba(30, 32, 36, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
core.40px 8px 20px 0px rgba(30, 32, 36, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
core.50px 4px 32px 0px rgba(30, 32, 36, 0.06), 0px 12px 32px 0px rgba(30, 32, 36, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.00)
투명도 (opacity) · 11개

설정 예: tokens: { opacity: { '10': '…' } }

키CSS 변수기본값
100.1
200.2
300.3
400.4
500.5
600.6
700.7
800.8
900.9
1001
disable0.38
쌓임 순서 (zIndex) · 16개

설정 예: tokens: { zIndex: { 'sticky': '…' } }

키CSS 변수기본값
sticky10
mobileStepper1000
fab1050
speedDial1050
appBar1100
drawer1200
surfacePanel1250
overlay1300
modal1300
transient1300
popoverOverModal1300
transientOver1300
picker1300
snackbar1400
tooltip1500
syncBorder10000
비율 (aspectRatios) · 7개

설정 예: tokens: { aspectRatios: { '16:9': '…' } }

키CSS 변수기본값
16:9
4:3
2:3
3:4
3:2
2:1
1:1

제한 사항

다음 항목은 테마로 변경할 수 없습니다.

  • 특정 컴포넌트의 모양(예: Button만 더 둥글게): 토큰은 여러 컴포넌트가 함께 사용하므로, 값을 변경하면 해당 토큰을 쓰는 모든 컴포넌트가 바뀝니다. 특정 컴포넌트만 변경할 때는 그 컴포넌트의 className·style을 사용하세요(컴포넌트 스타일링).
  • 선택 컨트롤의 강조 색: Checkbox·Radio·Switch·Tabs·Select·DatePicker·ProgressBar 등의 선택·진행 상태 색은 아직 공개되지 않은 토큰을 사용하므로 변경할 수 없습니다. 이후 버전에서 primary 토큰으로 변경할 수 있도록 지원할 예정입니다.
  • <html> 밖의 다크 모드: 커스텀 테마의 다크 값은 <html> 요소의 .dark에만 적용됩니다. <body>나 일부 영역에 지정한 .dark에서는 사용하지 않습니다.
  • 색이 아닌 토큰의 모드별 값: 간격·모서리·글꼴 등은 라이트와 다크에 같은 값을 사용합니다.
  • 컴포넌트 전용 토큰과 원시 팔레트: 버튼 배경 같은 컴포넌트 전용 값과 gray.light.200 같은 원시 색은 공개 토큰이 아니므로 지원하지 않습니다. 컴포넌트 값은 공개 토큰을 참조하므로 공개 토큰을 변경하세요.

권장 사항

구분내용
권장커스텀 테마는 defineTheme으로 한 곳에서 정의하고, data-panda-theme 속성과 .dark 클래스는 <html> 요소에 지정합니다.
권장브랜드 색을 변경할 때는 primary.* 토큰을 함께 변경합니다.
권장다크 모드를 사용하는 앱은 변경하는 색을 [라이트, 다크]로 지정합니다.
지양브랜드에 따른 시각 차이를 컴포넌트 코드에서 분기하지 않습니다(토큰으로 관리합니다).
지양컴포넌트 전용 변수(--ids-colors-button-… 등)나 원시 팔레트 변수를 덮어쓰지 않습니다. 버전에 따라 바뀔 수 있습니다.