# Upstage Design System — Modal (product)
- context: product · group: overlays
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /ko/components/product/modal/ · machine doc: /agent/components/product/modal.md
## Required references (read these)
- /components/overlays/Modal.jsx — implementation · sha256 f59637afd452…
- /components/_types.d.ts — api · key ModalProps
- /components/overlays/Modal.prompt.md — usage-note · sha256 b4b22f468c75…
- /kit/rules/a11y-contract.json — a11y · key Modal
## API (components/_types.d.ts ModalProps)
- open?: boolean
- onClose?: () => void
- title?: React.ReactNode
- description?: React.ReactNode
- footer?: React.ReactNode
- size?: "sm" | "md" | "lg" (default md)
- children?: React.ReactNode
- style?: React.CSSProperties
## Accessibility contract
- keys: Tab(trap), Shift+Tab, Escape
- aria: role=dialog, aria-modal, aria-labelledby, aria-describedby
- notes: 포커스를 오프너로 복원, body 스크롤 잠금
## Unverified
- Browser behaviour is not verified here (static source check only).
지원 환경
Lift 1.2.3 의 참조 구현은 React 18 함수 컴포넌트다. 스타일은 인라인이고 색은 Product 토큰(hsl(var(--*)))을 참조하므로 styles.product.css 가 로드돼 있어야 한다. npm 패키지와의 대응은 이 저장소에서 확인하지 못했다.
API
components/_types.d.ts 의 ModalProps 를 그대로 옮겼다.
| prop | type | default | doc |
|---|---|---|---|
open | boolean | — | |
onClose | () => void | — | |
title | React.ReactNode | — | |
description | React.ReactNode | — | |
footer | React.ReactNode | — | |
size | "sm" | "md" | "lg" | md | |
children | React.ReactNode | — | |
style | React.CSSProperties | — |
코드
가져오기 한 줄과 사용 지침 원문의 예시 코드다.
import { Modal } from "./components/overlays/Modal.jsx";<Modal open={open} onClose={() => setOpen(false)}
title="sk_live_4f2a 를 삭제합니다"
description="이 키를 쓰는 요청은 삭제 시점부터 401을 받습니다. 되돌릴 수 없습니다."
footer={<><Button variant="ghost" onClick={() => setOpen(false)}>취소</Button><Button variant="destructive">삭제</Button></>} />토큰 연결
구현 파일이 var() 로 직접 참조하는 토큰. 조건에 따라 이름을 조립하는 토큰(예: --state-${tone}-fg)은 빠진다.
--font-sans, --foreground, --modal-bg, --modal-border, --modal-shadow, --motion-overlay-in, --motion-panel-in, --muted-foreground, --overlay, --overlay-blur, --overlay-opacity, --radius-lg, --tracking-title, --z-modal
출처
components/overlays/Modal.jsximplementation · sha256 f59637afd452…components/_types.d.tsapi · ModalPropscomponents/overlays/Modal.prompt.mdusage-note · sha256 b4b22f468c75…kit/rules/a11y-contract.jsona11y · Modal