Drawer
현재 화면의 맥락을 유지하며 가장자리에서 보조 패널을 엽니다.
사용 가이드
#현재 화면을 유지하면서 상세 정보나 보조 설정을 보여줍니다. 반드시 결정을 받아야 한다면 Modal을 사용하세요.
- 위치와 크기
position으로 방향을 정합니다. 사용자 지정 크기는size="custom"과customSize(px)를 사용하세요.- 내용 구성
header·body·footer슬롯으로 제목, 상세 내용, 동작을 나누세요.- 열기와 닫기
open으로 열고closable·maskClosable로 닫기 동작을 정합니다.
예제
#기능별 예제
#14개 주제에서 필요한 기능을 선택하세요. 속성 설정, 메서드 호출, 이벤트 결과와 슬롯 구성을 실행 화면과 코드로 확인할 수 있습니다.
일치하는 기능이 없습니다.
API reference
#이름에 마우스를 올리거나 키보드로 선택하면 적용 코드를 확인할 수 있습니다. 터치 화면에서는 이름을 누르세요.
<sy-drawer>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
boolean | false | 배경 마스크를 생략합니다. | |
boolean | false | 사용자 닫기 동작을 막습니다. 앱에서 open=false로 종료하세요. | |
boolean | false | 닫기 버튼을 표시합니다. | |
boolean | false | 하위 메뉴가 펼쳐진 상태입니다. | |
number | 100 | size=custom일 때 패널 너비 또는 높이(px)입니다. | |
'top' | 'left' | 'right' | 'bottom' | 'right' | 패널이 나타날 화면 가장자리입니다. | |
'small' | 'medium' | 'large' | 'custom' | 'medium' | 컴포넌트의 크기입니다. | |
boolean | true | 배경을 클릭하면 패널을 닫습니다. | |
boolean | true | When true, drawer closes on browser history navigation. Spec default: true. | |
string | '' | 패널을 배치할 부모 요소의 id입니다. | |
| 'none'
| 'fade' | 'fade-scale' | 'zoom' | 'pop'
| 'slide' | 'slide-fade' | 'reveal'
| 'slide-top' | 'slide-bottom' | 'slide-left' | 'slide-right'
| 'slide-fade-top' | 'slide-fade-bottom' | 'slide-fade-left' | 'slide-fade-right'
| 'reveal-top' | 'reveal-bottom' | 'reveal-left' | 'reveal-right'
| 'flip-x' | 'flip-y' | 'bounce' | 'spin' | 'none' | Enter/exit animation type. `none` (default) toggles instantly. Three flavors of direction handling: - **Auto** (`slide`, `slide-fade`, `reveal`): direction follows the `position` attribute (a right-anchored drawer slides from the right). - **Explicit** (`slide-{top,bottom,left,right}`, `slide-fade-…`, `reveal-…`): direction is fixed regardless of `position`. - **Direction-less**: plays the same way no matter the orientation. Some combinations (e.g. `zoom` on an edge-anchored panel) look unusual but are exposed for completeness — selection is the consumer's call. | |
'x-fast' | 'fast' | 'medium' | 'slow' | 'x-slow' | 'fast' | Animation playback speed token. Maps to `--transition-*` global tokens. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<void> | 목록을 열면 발생합니다. | |
CustomEvent<void> | 이벤트의 detail에서 결과를 확인하세요. |
Slots
| Slot | Description |
|---|---|
| header 영역에 표시할 내용입니다. | |
| body 영역에 표시할 내용입니다. | |
| footer 영역에 표시할 내용입니다. |