Sheet
Sheet는 화면 오른쪽이나 왼쪽 끝에서 밀려 나오는 패널입니다. 주로 목록을 보면서 항목의 상세 정보를 확인하거나 편집할 때 사용됩니다. Dialog보다 넓은 세로 공간을 쓸 수 있어 입력 항목이 많거나 내용이 긴 작업에 알맞습니다.
State
Code
vue
<script setup>
import { ref } from 'vue'
import { ASheet, AInput, AButton } from '@mobigen/rnd-design-system'
const open = ref(false)
</script>
<template>
<AButton variant="secondary" @click="open = true">편집</AButton>
<ASheet v-model="open" title="데이터셋 편집" width="480px">
<AInput label="데이터셋 이름" />
<template #footer="{ close }">
<AButton variant="secondary" @click="close">취소</AButton>
<AButton variant="primary" @click="open = false">저장</AButton>
</template>
</ASheet>
</template>Props
| 속성 | 값 |
|---|---|
modelValue | true, false |
title | String |
description | String |
side | right, left |
width | String |
ariaLabel | String |
closable | true, false |
showClose | true, false |
closeLabel | String |
Events
| 이벤트 | 전달 값 |
|---|---|
update:modelValue | false |
Slots
| 슬롯 | 전달 값 |
|---|---|
default | 없음 |
footer | { close } |
Notes
- 열려 있는 동안 포커스는 패널 안에서만 움직이고, 닫히면 열기 전에 포커스가 있던 요소로 돌아간다.
- 화면 폭이 좁으면 패널 너비는 화면 폭에서 48px을 뺀 만큼까지 줄어든다.