문서 오버레이

UIAlertDialog

확인이 필요한 동작을 대화상자로 표시합니다.

기본 사용법

삭제하기 전에 확인 받기

트리거를 누르면 확인 창이 열립니다. 제목과 설명에 삭제 대상과 영향을 명시하고, 취소와 확인 동작을 배치합니다.

<script setup lang="ts">
import { UIButton, UIAlertDialog } from "@connextable/ui";
</script>

<template>
  <UIAlertDialog
    trigger-label="프로젝트 삭제"
    title="프로젝트를 삭제할까요?"
    description="프로젝트와 배포 기록이 영구적으로 삭제됩니다."
  >
    <template #actions="{ close }">
      <UIButton size="sm" variant="outline" @click="close">취소</UIButton>
      <UIButton size="sm" @click="close">프로젝트 삭제</UIButton>
    </template>
  </UIAlertDialog>
</template>

설정과 동작

확인 창 열기 버튼의 아이콘

trigger-icon에 Vue 컴포넌트를 전달해 기본 열기 버튼의 라벨 앞에 표시합니다.

확인한 경우에만 반영

취소하면 결과가 유지되고, 확인하면 변경 사항이 표시됩니다.

저장 중 확인 버튼 잠금

완료 처리를 누르면 저장이 끝날 때까지 확인 버튼에 로딩 상태를 표시합니다.

조합과 확장

확인 창을 포털에 배치

트리거는 현재 영역에 두고 표시되는 확인 창은 포털로 이동합니다.

구성 컴포넌트

팝업과 위치

UIAlertDialogPortal

콘텐츠를 현재 DOM 계층 밖의 포털 대상으로 옮깁니다.

확인 창을 포털에 배치 예제
UIAlertDialogOverlay

열린 창 뒤에서 배경과 활성 영역을 구분합니다.

확인한 경우에만 반영 예제
UIAlertDialogContent

트리거 또는 현재 값에 연결된 콘텐츠를 담습니다.

확인한 경우에만 반영 예제

탐색과 동작

UIAlertDialogTrigger

컨트롤을 실행하거나 콘텐츠를 여는 버튼입니다.

확인한 경우에만 반영 예제
UIAlertDialogClose

열린 콘텐츠를 닫습니다.

확인한 경우에만 반영 예제

값과 상태 표시

UIAlertDialogTitle

콘텐츠의 제목을 표시하고 접근성 이름으로 연결합니다.

확인한 경우에만 반영 예제
UIAlertDialogDescription

콘텐츠의 목적이나 추가 설명을 연결합니다.

확인한 경우에만 반영 예제

주요 API

속성과 모델

v-model:open타입boolean | undefined

확인 창의 열린 상태를 외부 상태와 연결합니다.

저장 중 확인 버튼 잠금 예제
label타입string | undefined

제목에서 이름을 제공하기 어려울 때 사용할 접근성 이름입니다.

trigger-label / title / description

열기 버튼, 확인 창 제목과 설명에 표시할 문구를 지정합니다.

확인 창 열기 버튼의 아이콘 예제
trigger-icon타입Component

기본 열기 버튼의 텍스트 앞에 표시할 아이콘입니다.

확인 창 열기 버튼의 아이콘 예제

슬롯

#actions타입PanelSlot

취소와 확인 버튼을 배치하고, 슬롯의 close로 확인 창을 닫습니다.

확인 창 열기 버튼의 아이콘 예제
Content #footer-leading

하단 왼쪽에 상태나 보조 콘텐츠를 배치합니다.

전체 속성, 이벤트와 슬롯

UIAlertDialog

disabled
boolean | undefined
label
string | undefined
close-on-interact-outside
boolean | undefined
open
boolean | undefined
shift
boolean | undefined
default-open
boolean | undefined
unmount-on-exit
boolean | undefined
arrow-padding
number | undefined
side
RectSide | undefined
align
RectAlign | undefined
side-offset
number | undefined
collision-padding
PositionPadding | undefined
collision-boundary
PositionBoundary | undefined
avoid-collisions
boolean | undefined
flip
boolean | undefined
hide-when-detached
boolean | undefined
strategy
PositionStrategy | undefined
tracking
PositionTracking | undefined
anchor
HTMLElement | null | undefined
close-on-escape
boolean | undefined
described-by
string | null | undefined
initial-focus
HTMLElement | undefined
auto-focus
boolean | undefined
restore-focus
boolean | undefined
restore-focus-target
HTMLElement | null | undefined
trap-focus
boolean | undefined
interact-outside-exclusions
readonly HTMLElement[] | undefined
title
string | undefined
description
string | undefined
trigger-label
string | undefined
trigger-icon
Component | undefined
panel-class
string | undefined
@update:open
(open: boolean) => void
@close-request
(reason: PopupCloseReason) => void
@after-close
() => void
@interact-outside
InteractOutsideHandler
#default
(state: PopupRootSlotProps) => VNodeChild
#trigger
PanelSlot
#body
PanelSlot
#actions
PanelSlot
#footer-leading
PanelSlot

UIAlertDialogContent

as
string | Component | undefined
as-child
boolean | undefined
#default
() => unknown
#footer-leading
() => unknown
#actions
() => unknown