기본 사용법
재고 표에 표시할 열 선택
열 표시를 눌러 재고나 보관 위치를 켜고 끕니다. 팝오버를 열어 둔 채 바뀐 표를 확인하고 완료로 닫습니다.
| 상품 | 재고 | 보관 위치 |
|---|---|---|
| 노트 | 48개 | A-02 |
| 펜 세트 | 16개 | B-04 |
설정과 동작
팝오버 열기 버튼의 아이콘
trigger-icon에 Vue 컴포넌트를 전달해 기본 열기 버튼의 라벨 앞에 표시합니다.
네 방향과 화살표
각 버튼을 눌러 방향에 따라 화살표가 트리거 쪽을 가리키는지 확인합니다.
트리거 끝에 정렬
side와 align을 함께 지정해 팝오버를 트리거의 아래쪽 끝에 맞춥니다.
바깥 클릭 시 열림 유지
바깥을 눌러도 열린 상태를 유지하고 완료 버튼으로 닫습니다.
조합과 확장
팝오버 안에서 긴 목록 스크롤
리전 목록을 스크롤해 항목을 선택합니다. 제목과 완료 버튼은 같은 자리에 있습니다.
포털로 이동
트리거 옆에 정렬하면서 콘텐츠는 포털에 렌더링합니다.
기준 요소를 따로 지정
열기 버튼과 별개로 배지에 맞춰 팝오버를 배치합니다.
구성 컴포넌트
팝업과 위치
UIPopoverAnchor떠 있는 콘텐츠의 위치를 계산할 때 기준이 되는 요소입니다.
기준 요소를 따로 지정 예제UIPopoverPortal콘텐츠를 현재 DOM 계층 밖의 포털 대상으로 옮깁니다.
포털로 이동 예제UIPopoverContent트리거 또는 현재 값에 연결된 콘텐츠를 담습니다.
네 방향과 화살표 예제UIPopoverArrow팝업이 어떤 트리거에 붙어 있는지 시각적으로 나타냅니다.
네 방향과 화살표 예제
탐색과 동작
UIPopoverTrigger컨트롤을 실행하거나 콘텐츠를 여는 버튼입니다.
네 방향과 화살표 예제UIPopoverClose열린 콘텐츠를 닫습니다.
바깥 클릭 시 열림 유지 예제
값과 상태 표시
UIPopoverTitle콘텐츠의 제목을 표시하고 접근성 이름으로 연결합니다.
네 방향과 화살표 예제UIPopoverDescription콘텐츠의 목적이나 추가 설명을 연결합니다.
네 방향과 화살표 예제
주요 API
속성과 모델
trigger-label기본 트리거 버튼의 텍스트입니다.
팝오버 열기 버튼의 아이콘 예제trigger-icon기본 열기 버튼의 텍스트 앞에 표시할 아이콘입니다.
팝오버 열기 버튼의 아이콘 예제side팝오버가 놓일 방향입니다.
네 방향과 화살표 예제align기준 요소에 맞춰 정렬할 위치입니다.
트리거 끝에 정렬 예제close-on-interact-outside기본값은 true입니다. 바깥을 눌렀을 때 열린 상태를 유지하려면 false를 지정합니다.
바깥 클릭 시 열림 유지 예제
슬롯
#trigger팝오버를 여는 버튼을 직접 구성합니다.
#body트리거 옆에 표시할 내용을 배치합니다. 슬롯의 close()를 호출하면 팝오버를 닫습니다.
재고 표에 표시할 열 선택 예제
전체 속성, 이벤트와 슬롯
UIPopover
anchorHTMLElement | null | undefinedopenboolean | undefineddefault-openboolean | undefineddisabledboolean | undefinedmodalboolean | undefinedlabelstring | undefineddescribed-bystring | null | undefinedinitial-focusHTMLElement | undefinedauto-focusboolean | undefinedrestore-focusboolean | undefinedrestore-focus-targetHTMLElement | null | undefinedtrap-focusboolean | undefinedclose-on-escapeboolean | undefinedclose-on-interact-outsideboolean | undefinedinteract-outside-exclusionsreadonly HTMLElement[] | undefinedunmount-on-exitboolean | undefinedpositionboolean | undefinedsideRectSide | undefinedalignRectAlign | undefinedside-offsetnumber | undefinedcollision-paddingPositionPadding | undefinedcollision-boundaryPositionBoundary | undefinedavoid-collisionsboolean | undefinedflipboolean | undefinedshiftboolean | undefinedarrow-paddingnumber | undefinedhide-when-detachedboolean | undefinedstrategyPositionStrategy | undefinedtrackingPositionTracking | undefinedtitlestring | undefineddescriptionstring | undefinedtrigger-labelstring | undefinedtrigger-iconComponent | undefinedpanel-classstring | undefined@update:open(open: boolean) => void@close-request(reason: PopupCloseReason) => void@after-close() => void@interact-outsideInteractOutsideHandler#default(state: PopupRootSlotProps) => VNodeChild#triggerPanelSlot#bodyPanelSlot#actionsPanelSlot#footer-leadingPanelSlot