LiftDesign System
Beta
English 시작하기
  1. Components
  2. Product
  3. Button

Components / Product

Button — 구현

Product 화면의 주요·보조·파괴적 동작 버튼. 한 화면에 primary 는 하나(B-5).

Context
Product
콘텐츠
draft
사용 가능성
implemented
검증
static-only 2026-09-23 · lift-1.0.1
기준 revision
Lift 1.2.3 8d5d9377c2b4…
원문 언어
KO
갱신
2026-09-23
button.md ↗

지원 환경

Lift 1.2.3 의 참조 구현은 React 18 함수 컴포넌트다. 스타일은 인라인이며 색은 전부 Product semantic 토큰(hsl(var(--*)))을 참조하므로 styles.product.css(또는 primitives.css + tokens.product.css)가 로드돼 있어야 한다. prop 계약은 components/_types.d.ts 의 ButtonProps 다. npm 패키지(@upstageai/ui)와의 대응은 이 저장소에서 확인하지 못했다.

설치 · 연결

  1. Lift 스킬의 references/starter-kit/components/actions/Button.jsx 와 components/_types.d.ts 를 프로젝트에 복사하고 상대 경로로 import 한다.
  2. HTML 데모에서는 _ds_bundle.js 가 window.UpstageDesignSystem_bdeb42 에 컴포넌트를 노출한다. 이 사이트의 미리보기와 Console 키트가 같은 방식으로 실제 소스를 렌더한다.
  3. Tailwind 3 + @upstageai/ui 1.2.x 또는 Tailwind 4 + 2.1.0+ 환경의 연결 방법은 Lift 스킬의 scripts/detect_compat.py 와 references/compatibility.md 를 따른다. 이 사이트는 그 경로를 검증하지 않았다.

API

prop 표는 components/_types.d.ts 의 ButtonProps 에서, 값 목록과 크기는 Button.jsx 에서 빌드 시 읽는다. ButtonProps 는 native button 속성(onClick 포함)을 모두 받는다. 표에 없는 loading · asChild 는 이 구현에 없다.

proptypedefaultdoc
variant"primary" | "secondary" | "destructive" | "outline" | "ghost" | "accent"primaryVisual variant. Prefer outline/ghost for secondary actions; secondary is a deprecated outline alias.
size"sm" | "md" | "lg"mdControl height: sm 32 / md 40 / lg 48
disabledbooleanfalse
childrenReact.ReactNode—
styleReact.CSSProperties—

그 밖의 prop 은 ...rest 로 button 요소에 전달된다. 구현이 항상 설정하는 속성: aria-disabled, data-ds-focus, disabled, type.

코드

jsx · Lift 1.2.3
import { Button } from "./components/actions/Button.jsx";

<Button variant="primary" size="md" onClick={createKey}>API 키 만들기</Button>
<Button variant="outline">취소</Button>

조작 가능한 미리보기는 개요 탭에 있다. 같은 소스·같은 런타임이다. 개요

토큰 연결

--accent, --accent-active, --accent-border, --accent-foreground, --accent-hover, --border, --btn-ghost-active, --btn-ghost-hover, --btn-outline-active, --btn-outline-border-hover, --btn-outline-hover, --destructive, --destructive-active, --destructive-foreground, --destructive-hover, --disabled, --disabled-border, --disabled-foreground, --font-sans, --foreground, --primary, --primary-active, --primary-foreground, --primary-hover, --transition-colors

variant용도기본 배경tokens
primary화면의 주요 동작. 한 화면에 하나hsl(var(--primary))--primary, --primary-active, --primary-foreground, --primary-hover
secondaryoutline과 같은 호환 별칭입니다. 새 보조 동작에는 outline 또는 ghost를 사용합니다.transparent--border, --btn-outline-active, --btn-outline-border-hover, --btn-outline-hover, --foreground
destructive삭제·되돌릴 수 없는 동작hsl(var(--destructive))--destructive, --destructive-active, --destructive-foreground, --destructive-hover
outline보조 동작. primary 옆의 취소·닫기transparent--border, --btn-outline-active, --btn-outline-border-hover, --btn-outline-hover, --foreground
ghost가장 낮은 강조. 툴바·표 안의 동작transparent--btn-ghost-active, --btn-ghost-hover, --foreground
accentbrand-50 틴트. 선택·활성 상태를 띤 동작hsl(var(--accent))--accent, --accent-active, --accent-border, --accent-foreground, --accent-hover

size

sizemin-heightpaddingfont-sizeradius
sm32px0 12px13px6px
md40px0 16px14px8px
lg48px0 20px16px8px

값 출처: components/actions/Button.jsx (Lift 1.2.3) 에서 빌드 시 파싱. disabled 는 --disabled, --disabled-border, --disabled-foreground.

제약

  • type="button" 이 기본이다. 폼 제출에는 type="submit" 을 명시해 넘긴다.
  • disabled 는 DOM disabled 와 aria-disabled 를 함께 설정한다.
  • hover·active 는 컴포넌트 내부 state 로 처리되며 CSS :hover 가 아니다. 외부에서 넘긴 onMouseEnter·onKeyDown 등은 내부 처리 뒤 그대로 호출된다(Lift 1.0.1).
  • rest prop 으로 aria-*, data-*, onClick 이 그대로 전달된다.

출처

파일 sha256 은 빌드 시 계산했다. /agent-manifest.json 의 값과 같다.