tailwind.config.ts에 정의

// tailwind.config.ts
theme: {
  extend: {
    colors: {
      primary: '#3B82F6',
    }
  }
}

// 사용
<button className="bg-primary">버튼</button>

@apply로 추출

/* styles.css */
.btn-primary {
  @apply bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600;
}

// 사용
<button className="btn-primary">버튼</button>

결론