# 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).

## Usage note (original, KO)

Blocking dialog. Focus is trapped inside, Esc and backdrop click close it, and focus returns to the opener. One primary action in `footer`.



제목은 선언형으로 쓴다 — "삭제할까요?"처럼 되묻지 않고 무엇이 일어나는지 적는다(B-1). 설명에는 결과를 구체적으로 쓴다(에러 코드, 영향 범위, 되돌릴 수 있는지). 모달을 겹치지 않는다. 차단이 필요 없는 알림은 Toast.

확인 다이얼로그 문형과 버튼 라벨은 [DESIGN.microcopy.md](../../context/DESIGN.microcopy.md) §4. 되돌릴 수 있는 작업은 확인 없이 실행하고 Toast에 실행 취소를 둔다 — 확인을 남발하면 읽지 않고 누른다.

### 1.9.4 상태·접근성 계약


onClose 인라인 함수는 지원된다. 최신 콜백을 참조하고 부모 재렌더는 포커스를 초기화하지 않는다. 최상위 모달만 Tab/Escape를 처리하며 중첩 모달이 닫혀도 남은 모달의 스크롤 잠금은 유지한다.

## Examples (from the usage note)

```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></>} />
```
