Feedback
Confirm
semantic HTML위험하거나 되돌리기 어려운 작업을 확인합니다.
Live example
<button type="button" data-example-action="open-confirm">Archive project</button><dialog data-standard-component="confirm" id="standard-confirm"><article><header><strong>Archive project?</strong></header><p>You can restore it later.</p><footer><form method="dialog"><button value="no" class="secondary" data-confirm="no">Cancel</button><button value="yes" data-confirm="yes">Archive</button></form></footer></article></dialog><output data-example-output aria-live="polite">No decision</output>Variants and sizes
The pattern inherits theme and density tokens. Use compact, comfortable, or roomy density when the surrounding screen requires it.
compactcomfortableroomy
Public API
| Contract | Value |
|---|---|
| Implementation | semantic HTML |
| Status | stable |
| License | free |
| Since | 0.2 |
| HTML contract | Native HTML elements and attributes |
| Events | Native browser events |
Accessibility
모든 닫기 경로에서 Promise를 종료하고 yes/no 결과 뒤 원래 포커스로 복귀합니다.
Server template guidance
<!-- Render the semantic HTML on the server. Load enhancement JavaScript only when this interaction is needed. -->