Galleria (갤러리아)
Galleria는 이미지 갤러리를 보여 주는 콘텐츠 컴포넌트예요. 커스텀 UI, 자동 재생, 썸네일, 캡션 같은 기능을 조합해 다양한 갤러리 형태를 만들 수 있죠.
출처: 문서
본문
가져오기 (Import)
import Galleria from 'primevue/galleria';
접근성 (AccessibilityDoc)
스크린 리더
Galleria는 region role을 사용해요. 그리고 어떤 속성이든 메인 컨테이너 요소로 전달되기 때문에, aria-label이나 aria-roledescription 같은 속성을 직접 지정할 수도 있죠. 슬라이드 컨테이너에는 aria-live 속성이 붙는데, 자동 재생 모드가 아니면 "polite"가, 자동 재생 중이라면 "off"가 값으로 설정돼요.
각 슬라이드는 group role을 가지며, locale API의 aria.slideNumber 속성을 참조하는 aria-label이 붙어요. 비슷한 방식으로 aria.slide가 항목의 aria-roledescription으로 쓰이고, 재생 대상이 아닌 슬라이드는 aria-hidden으로 스크린 리더에서 가려져요.
다음/이전 내비게이터는 button 요소인데, 기본적으로 locale API의 aria.prevPageLabel과 aria.nextPageLabel 속성을 참조하는 aria-label을 가져요. 다만 nextButtonProps와 prevButtonProps를 쓰면 유효한 속성이 버튼 요소에 그대로 전달되기 때문에, 자체 aria role과 속성을 사용할 수도 있죠.
빠른 내비게이션 요소와 썸네일은 tab 패턴을 따라요. tablist role을 가진 요소 안에 배치되고, 각 항목은 aria-selected와 aria-controls 속성을 가진 tab role을 가져요. 빠른 내비게이션 항목의 aria-label은 locale API의 aria.pageLabel을 참조하고, 현재 페이지는 aria-current로 표시돼요.
전체 화면 모드에서는 모달 요소가 dialog role을 사용하며 aria-modal이 활성화돼요. 닫기 버튼의 aria-label은 locale API의 aria.close 속성에서 가져와요.
다음/이전 키보드 지원에서는 tab 키가 캐러셀의 대화형 요소들 사이로 포커스를 옮기고, enter와 space가 내비게이션을 활성화해요. 빠른 내비게이션 키보드 지원에서는 tab 키가 활성 슬라이드 링크 사이로 포커스를 옮기고, enter와 space가 포커스된 슬라이드 링크를 활성화하죠. right arrow는 다음 슬라이드 링크로, left arrow는 이전 슬라이드 링크로 포커스를 옮기고, home은 첫 슬라이드 링크로, end는 마지막 슬라이드 링크로 이동해요.
고급 활용 (AdvancedDoc)
커스텀 UI를 곁들인 고급 Galleria 구현 예제예요.
<Galleria
ref="galleria"
v-model:activeIndex="activeIndex"
:value="images"
:numVisible="5"
containerStyle="max-width: 640px"
:showThumbnails="showThumbnails"
:showItemNavigators="true"
:showItemNavigatorsOnHover="true"
:circular="true"
:autoPlay="isAutoPlay"
:transitionInterval="3000"
:responsiveOptions="responsiveOptions"
:pt="{
root: {
class: [{ 'flex flex-col': fullScreen }]
},
content: {
class: ['relative', { 'flex-1 justify-center': fullScreen }]
},
thumbnails: 'absolute w-full left-0 bottom-0'
}"
>
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" :style="[{ width: !fullScreen ? '100%' : '', display: !fullScreen ? 'block' : '' }]" />
</template>
<template #thumbnail="slotProps">
<div class="grid gap-4 justify-center">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</div>
</template>
<template #footer>
<div class="flex items-stretch bg-surface-950 text-white h-10">
<button type="button" @click="onThumbnailButtonClick" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3">
<i class="pi pi-th-large"></i>
</button>
<button type="button" @click="toggleAutoSlide" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3"><i :class="slideButtonIcon"></i></button>
<span v-if="images" class="flex items-center gap-4 ml-3">
<span class="text-sm">{{ activeIndex + 1 }}/{{ images.length }}</span>
<span class="font-bold text-sm">{{ images[activeIndex].title }}</span>
<span class="text-sm">{{ images[activeIndex].alt }}</span>
</span>
<button type="button" @click="toggleFullScreen" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3 ml-auto">
<i :class="fullScreenIcon"></i>
</button>
</div>
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<Galleria
ref="galleria"
v-model:activeIndex="activeIndex"
:value="images"
:numVisible="5"
containerStyle="max-width: 640px"
:showThumbnails="showThumbnails"
:showItemNavigators="true"
:showItemNavigatorsOnHover="true"
:circular="true"
:autoPlay="isAutoPlay"
:transitionInterval="3000"
:responsiveOptions="responsiveOptions"
:pt="{
root: {
class: [{ 'flex flex-col': fullScreen }]
},
content: {
class: ['relative', { 'flex-1 justify-center': fullScreen }]
},
thumbnails: 'absolute w-full left-0 bottom-0'
}"
>
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" :style="[{ width: !fullScreen ? '100%' : '', display: !fullScreen ? 'block' : '' }]" />
</template>
<template #thumbnail="slotProps">
<div class="grid gap-4 justify-center">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</div>
</template>
<template #footer>
<div class="flex items-stretch bg-surface-950 text-white h-10">
<button type="button" @click="onThumbnailButtonClick" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3">
<i class="pi pi-th-large"></i>
</button>
<button type="button" @click="toggleAutoSlide" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3"><i :class="slideButtonIcon"></i></button>
<span v-if="images" class="flex items-center gap-4 ml-3">
<span class="text-sm">{{ activeIndex + 1 }}/{{ images.length }}</span>
<span class="font-bold text-sm">{{ images[activeIndex].title }}</span>
<span class="text-sm">{{ images[activeIndex].alt }}</span>
</span>
<button type="button" @click="toggleFullScreen" class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3 ml-auto">
<i :class="fullScreenIcon"></i>
</button>
</div>
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, computed, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
bindDocumentListeners();
});
const galleria = ref();
const images = ref();
const activeIndex = ref(0);
const showThumbnails = ref(false);
const fullScreen = ref(false);
const isAutoPlay = ref(true);
const toggleAutoSlide = () => {
isAutoPlay.value = !isAutoPlay.value ;
};
const onThumbnailButtonClick = () => {
showThumbnails.value = !showThumbnails.value ;
};
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
const toggleFullScreen = () => {
if (fullScreen.value ) {
closeFullScreen();
} else {
openFullScreen();
}
};
const onFullScreenChange = () => {
fullScreen.value = !fullScreen.value ;
};
const openFullScreen = () =>{
let elem = galleria.value.$el;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) {
/* Firefox */
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
/* Chrome, Safari & Opera */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) {
/* IE/Edge */
elem.msRequestFullscreen();
}
};
const closeFullScreen = () => {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
};
const bindDocumentListeners = () => {
document.addEventListener('fullscreenchange', onFullScreenChange);
document.addEventListener('mozfullscreenchange', onFullScreenChange);
document.addEventListener('webkitfullscreenchange', onFullScreenChange);
document.addEventListener('msfullscreenchange', onFullScreenChange);
};
const unbindDocumentListeners = () => {
document.removeEventListener('fullscreenchange', onFullScreenChange);
document.removeEventListener('mozfullscreenchange', onFullScreenChange);
document.removeEventListener('webkitfullscreenchange', onFullScreenChange);
document.removeEventListener('msfullscreenchange', onFullScreenChange);
};
const fullScreenIcon = computed(() => {
return \`pi \${fullScreen.value ? 'pi-window-minimize' : 'pi-window-maximize'}\`;
});
const slideButtonIcon = computed(() => {
return \`pi \${isAutoPlay.value ? 'pi-pause' : 'pi-play'}\`;
});
<\/script>
자동 재생 (AutoPlayDoc)
circular와 autoPlay 속성을 추가하면 슬라이드쇼 형태로 동작하게 만들 수 있어요.
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px" :circular="true" :autoPlay="true" :transitionInterval="2000">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px"
:circular="true" :autoPlay="true" :transitionInterval="2000">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
});
const images = ref();
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
<\/script>
기본 (Basic)
Galleria는 value에 이미지 컬렉션을 담아 전달하고, 고해상도 이미지를 그리는 item 템플릿과 썸네일용 thumbnail 템플릿을 함께 제공하는 형태로 사용해요.
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
</template>
</Galleria>
캡션 (CaptionDoc)
이미지 설명은 caption 속성으로 지정해요. 이 속성은 표시 중인 객체를 받아서 콘텐츠를 반환하죠.
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</template>
<template #caption="slotProps">
<div class="text-xl mb-2 font-bold">{{ slotProps.item.title }}</div>
<p class="text-white">{{ slotProps.item.alt }}</p>
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="display: block" />
</template>
<template #caption="slotProps">
<div class="text-xl mb-2 font-bold">{{ slotProps.item.title }}</div>
<p class="text-white">{{ slotProps.item.alt }}</p>
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
});
const images = ref();
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
<\/script>
프로그래밍 방식 제어 (Controlled)
activeIndex에 바인딩하면 Galleria를 프로그램에서 직접 제어할 수 있어요.
<div>
<Button icon="pi pi-minus" @click="prev" />
<Button icon="pi pi-plus" @click="next" severity="secondary" class="ml-2" />
</div>
<Galleria v-model:activeIndex="activeIndex" :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<div class="mb-4">
<Button icon="pi pi-minus" @click="prev" />
<Button icon="pi pi-plus" @click="next" severity="secondary" class="ml-2" />
</div>
<Galleria v-model:activeIndex="activeIndex" :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" />
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
});
const images = ref();
const activeIndex = ref(2);
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
const next = () => {
activeIndex.value = activeIndex.value === images.value.length - 1 ? images.value.length - 1 : activeIndex.value + 1;
};
const prev = () => {
activeIndex.value = activeIndex.value === 0 ? 0 : activeIndex.value - 1;
};
<\/script>
반응형 (ResponsiveDoc)
화면 크기별 설정은 responsiveOptions 속성으로 정의해요.
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" :circular="true" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" :circular="true" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
});
const images = ref();
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
<\/script>
썸네일 (ThumbnailDoc)
썸네일은 실제 콘텐츠를 축소해 보여 주는 버전이에요.
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="5" :thumbnailsPosition="position" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<div class="grid gap-4 justify-center">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block;" />
</div>
</template>
</Galleria>
Composition API 예제
<template>
<div class="card">
<div class="flex flex-wrap gap-4 mb-8">
<div v-for="option in positionOptions" :key="option.label" class="flex items-center">
<RadioButton v-model="position" :inputId="option.label" name="option" :value="option.value" />
<label :for="option.label" class="ml-2"> {{ option.label }} </label>
</div>
</div>
<Galleria :value="images" :responsiveOptions="responsiveOptions" :numVisible="4" :thumbnailsPosition="position" containerStyle="max-width: 640px">
<template #item="slotProps">
<img :src="slotProps.item.itemImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block" />
</template>
<template #thumbnail="slotProps">
<div class="grid gap-4 justify-center">
<img :src="slotProps.item.thumbnailImageSrc" :alt="slotProps.item.alt" style="width: 100%; display: block;" />
</div>
</template>
</Galleria>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { PhotoService } from '@/service/PhotoService';
const images = ref();
const position = ref('bottom');
const positionOptions = ref([
{
label: 'Bottom',
value: 'bottom'
},
{
label: 'Top',
value: 'top'
},
{
label: 'Left',
value: 'left'
},
{
label: 'Right',
value: 'right'
}
]);
const responsiveOptions = ref([
{
breakpoint: '1300px',
numVisible: 4
},
{
breakpoint: '575px',
numVisible: 1
}
]);
onMounted(() => {
PhotoService.getImages().then((data) => (images.value = data));
});
<\/script>
Galleria
Props (속성)
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| id | string | - | 요소의 고유 식별자. |
| value | any[] | - | 표시할 객체 배열. |
| activeIndex | number | 0 | 첫 번째 항목의 인덱스. |
| fullScreen | boolean | false | 컴포넌트를 전체 화면으로 표시할지 여부. |
| visible | boolean | false | 전체 화면 모드에서 마스크의 표시 여부. |
| numVisible | number | 3 | 페이지당 항목 수. |
| responsiveOptions | GalleriaResponsiveOptions[] | - | 반응형 디자인용 옵션 배열. |
| showItemNavigators | boolean | false | 항목 영역에 내비게이션 버튼을 표시할지 여부. |
| showThumbnailNavigators | boolean | true | 썸네일 컨테이너에 내비게이션 버튼을 표시할지 여부. |
| showItemNavigatorsOnHover | boolean | false | 항목에 마우스를 올렸을 때 내비게이션 버튼을 표시할지 여부. |
| changeItemOnIndicatorHover | boolean | false | 활성화하면 인디케이터에 마우스를 올릴 때 항목이 바뀌어요. |
| circular | boolean | false | 스크롤을 무한 순환으로 할지 여부. |
| autoPlay | boolean | false | autoPlay 모드에서 항목이 슬라이드쇼로 표시돼요. |
| transitionInterval | number | 4000 | 항목을 스크롤하는 시간(밀리초). |
| showThumbnails | boolean | true | 썸네일 컨테이너를 표시할지 여부. |
| thumbnailsPosition | HintedString<"left" | "right" | "top" | "bottom"> | bottom | 썸네일 위치. |
| verticalThumbnailViewPortHeight | string | 300px | 세로 썸네일에서 뷰포트의 높이. |
| showIndicators | boolean | false | 인디케이터 컨테이너를 표시할지 여부. |
| showIndicatorsOnItem | boolean | false | 활성화하면 인디케이터 컨테이너가 항목 컨테이너 위에 표시돼요. |
| indicatorsPosition | HintedString<"left" | "right" | "top" | "bottom"> | bottom | 인디케이터 위치. |
| baseZIndex | number | 0 | 레이어링에 사용하는 기본 zIndex 값. |
| maskClass | string | - | 전체 화면 모드에서 마스크의 스타일 클래스. |
| containerStyle | any | - | 전체 화면 모드에서 컴포넌트의 인라인 스타일. 그 외의 경우 'style' 속성을 쓸 수 있어요. |
| containerClass | any | - | 전체 화면 모드에서 컴포넌트의 스타일 클래스. 그 외의 경우 'class' 속성을 쓸 수 있어요. |
| containerProps | HTMLAttributes | - | 전체 화면 모드에서 HTMLDivElement의 모든 속성을 컨테이너 요소로 전달해요. |
| prevButtonProps | ButtonHTMLAttributes | - | HTMLButtonElement의 모든 속성을 이전 내비게이션 버튼으로 전달해요. |
| nextButtonProps | ButtonHTMLAttributes | - | HTMLButtonElement의 모든 속성을 다음 내비게이션 버튼으로 전달해요. |
| ariaLabel | string | - | 대화형 요소에 이름을 붙이는 문자열 값이에요. |
| ariaRoledescription | string | - | 컴포넌트 역활에 대한 설명이 되는 문자열 값이에요. |
| dt | any | - | 컴포넌트의 디자인 토큰으로 스코프드 CSS 변수를 생성해요. |
| pt | PassThrough | - | 컴포넌트 내부 DOM 요소로 속성을 전달해요. |
| ptOptions | any | - | 컴포넌트의 passthrough(pt) 옵션을 설정해요. |
| unstyled | boolean | false | 활성화하면 코어의 컴포넌트 관련 스타일을 제거해요. |
패스스루 옵션 (Pass Through Options)
| 이름 | 타입 | 설명 |
|---|---|---|
| root | GalleriaPassThroughOptionType | root의 DOM 요소로 속성을 전달해요. |
| closeButton | GalleriaPassThroughOptionType | 닫기 버튼의 DOM 요소로 속성을 전달해요. |
| closeIcon | GalleriaPassThroughOptionType | 닫기 아이콘의 DOM 요소로 속성을 전달해요. |
| header | GalleriaPassThroughOptionType | 헤더의 DOM 요소로 속성을 전달해요. |
| content | GalleriaPassThroughOptionType | 콘텐츠의 DOM 요소로 속성을 전달해요. |
| footer | GalleriaPassThroughOptionType | 푸터의 DOM 요소로 속성을 전달해요. |
| itemsContainer | GalleriaPassThroughOptionType | 항목 컨테이너의 DOM 요소로 속성을 전달해요. |
| items | GalleriaPassThroughOptionType | 항목들의 DOM 요소로 속성을 전달해요. |
| prevButton | GalleriaPassThroughOptionType | 이전 항목 버튼의 DOM 요소로 속성을 전달해요. |
| prevIcon | GalleriaPassThroughOptionType | 이전 항목 아이콘의 DOM 요소로 속성을 전달해요. |
| item | GalleriaPassThroughOptionType | 항목의 DOM 요소로 속성을 전달해요. |
| nextButton | GalleriaPassThroughOptionType | 다음 항목 버튼의 DOM 요소로 속성을 전달해요. |
| nextIcon | GalleriaPassThroughOptionType | 다음 항목 아이콘의 DOM 요소로 속성을 전달해요. |
| caption | GalleriaPassThroughOptionType | 캡션의 DOM 요소로 속성을 전달해요. |
| indicatorList | GalleriaPassThroughOptionType | 인디케이터 목록의 DOM 요소로 속성을 전달해요. |
| indicator | GalleriaPassThroughOptionType | 인디케이터의 DOM 요소로 속성을 전달해요. |
| indicatorButton | GalleriaPassThroughOptionType | 인디케이터 버튼의 DOM 요소로 속성을 전달해요. |
| thumbnails | GalleriaPassThroughOptionType | 썸네일들의 DOM 요소로 속성을 전달해요. |
| thumbnailContent | GalleriaPassThroughOptionType | 썸네일 콘텐츠의 DOM 요소로 속성을 전달해요. |
| thumbnailPrevButton | GalleriaPassThroughOptionType | 이전 썸네일 버튼의 DOM 요소로 속성을 전달해요. |
| thumbnailPrevIcon | GalleriaPassThroughOptionType | 이전 썸네일 아이콘의 DOM 요소로 속성을 전달해요. |
| thumbnailsViewport | GalleriaPassThroughOptionType | 썸네일 뷰포트의 DOM 요소로 속성을 전달해요. |
| thumbnailItems | GalleriaPassThroughOptionType | 썸네일 항목들의 DOM 요소로 속성을 전달해요. |
| thumbnailItem | GalleriaPassThroughOptionType | 썸네일 항목의 DOM 요소로 속성을 전달해요. |
| thumbnail | GalleriaPassThroughOptionType | 썸네일의 DOM 요소로 속성을 전달해요. |
| thumbnailNextButton | GalleriaPassThroughOptionType | 다음 썸네일 버튼의 DOM 요소로 속성을 전달해요. |
| thumbnailNextIcon | GalleriaPassThroughOptionType | 다음 썸네일 아이콘의 DOM 요소로 속성을 전달해요. |
| mask | GalleriaPassThroughOptionType | 마스크의 DOM 요소로 속성을 전달해요. |
| hooks | any | 모든 라이프사이클 훅을 관리해요. |
| transition | GalleriaPassThroughTransitionType | Vue Transition API를 제어해요. |
테마 (Theming)
CSS 클래스 (CSS Classes)
| 클래스 | 설명 |
|---|---|
| p-galleria-mask | 마스크 요소의 클래스 이름 |
| p-galleria | 루트 요소의 클래스 이름 |
| p-galleria-close-button | 닫기 버튼 요소의 클래스 이름 |
| p-galleria-close-icon | 닫기 아이콘 요소의 클래스 이름 |
| p-galleria-header | 헤더 요소의 클래스 이름 |
| p-galleria-content | 콘텐츠 요소의 클래스 이름 |
| p-galleria-footer | 푸터 요소의 클래스 이름 |
| p-galleria-items-container | 항목 컨테이너 요소의 클래스 이름 |
| p-galleria-items | 항목 요소의 클래스 이름 |
| p-galleria-prev-button | 이전 항목 버튼 요소의 클래스 이름 |
| p-galleria-prev-icon | 이전 항목 아이콘 요소의 클래스 이름 |
| p-galleria-item | 항목 요소의 클래스 이름 |
| p-galleria-next-button | 다음 항목 버튼 요소의 클래스 이름 |
| p-galleria-next-icon | 다음 항목 아이콘 요소의 클래스 이름 |
| p-galleria-caption | 캡션 요소의 클래스 이름 |
| p-galleria-indicator-list | 인디케이터 목록 요소의 클래스 이름 |
| p-galleria-indicator | 인디케이터 요소의 클래스 이름 |
| p-galleria-indicator-button | 인디케이터 버튼 요소의 클래스 이름 |
| p-galleria-thumbnails | 썸네일 요소의 클래스 이름 |
| p-galleria-thumbnails-content | 썸네일 콘텐츠 요소의 클래스 이름 |
| p-galleria-thumbnail-prev-button | 이전 썸네일 버튼 요소의 클래스 이름 |
| p-galleria-thumbnail-prev-icon | 이전 썸네일 아이콘 요소의 클래스 이름 |
| p-galleria-thumbnails-viewport | 썸네일 뷰포트 요소의 클래스 이름 |
| p-galleria-thumbnail-items | 썸네일 항목들 요소의 클래스 이름 |
| p-galleria-thumbnail-item | 썸네일 항목 요소의 클래스 이름 |
| p-galleria-thumbnail | 썸네일 요소의 클래스 이름 |
| p-galleria-thumbnail-next-button | 다음 썸네일 버튼 요소의 클래스 이름 |
| p-galleria-thumbnail-next-icon | 다음 썸네일 아이콘 요소의 클래스 이름 |
디자인 토큰 (Design Tokens)
| 토큰 | CSS 변수 | 설명 |
|---|---|---|
| galleria.border.width | --p-galleria-border-width | 루트의 테두리 두께 |
| galleria.border.color | --p-galleria-border-color | 루트의 테두리 색 |
| galleria.border.radius | --p-galleria-border-radius | 루트의 테두리 반경 |
| galleria.transition.duration | --p-galleria-transition-duration | 루트의 전환 지속 시간 |
| galleria.nav.button.background | --p-galleria-nav-button-background | 내비게이션 버튼의 배경 |
| galleria.nav.button.hover.background | --p-galleria-nav-button-hover-background | 내비게이션 버튼의 호버 배경 |
| galleria.nav.button.color | --p-galleria-nav-button-color | 내비게이션 버튼의 색 |
| galleria.nav.button.hover.color | --p-galleria-nav-button-hover-color | 내비게이션 버튼의 호버 색 |
| galleria.nav.button.size | --p-galleria-nav-button-size | 내비게이션 버튼의 크기 |
| galleria.nav.button.gutter | --p-galleria-nav-button-gutter | 내비게이션 버튼의 거터 |
| galleria.nav.button.prev.border.radius | --p-galleria-nav-button-prev-border-radius | 내비게이션 버튼의 이전 테두리 반경 |
| galleria.nav.button.next.border.radius | --p-galleria-nav-button-next-border-radius | 내비게이션 버튼의 다음 테두리 반경 |
| galleria.nav.button.focus.ring.width | --p-galleria-nav-button-focus-ring-width | 내비게이션 버튼의 포커스 링 두께 |
| galleria.nav.button.focus.ring.style | --p-galleria-nav-button-focus-ring-style | 내비게이션 버튼의 포커스 링 스타일 |
| galleria.nav.button.focus.ring.color | --p-galleria-nav-button-focus-ring-color | 내비게이션 버튼의 포커스 링 색 |
| galleria.nav.button.focus.ring.offset | --p-galleria-nav-button-focus-ring-offset | 내비게이션 버튼의 포커스 링 오프셋 |
| galleria.nav.button.focus.ring.shadow | --p-galleria-nav-button-focus-ring-shadow | 내비게이션 버튼의 포커스 링 그림자 |
| galleria.nav.icon.size | --p-galleria-nav-icon-size | 내비게이션 아이콘의 크기 |
| galleria.thumbnails.content.background | --p-galleria-thumbnails-content-background | 썸네일 콘텐츠의 배경 |
| galleria.thumbnails.content.padding | --p-galleria-thumbnails-content-padding | 썸네일 콘텐츠의 패딩 |
| galleria.thumbnail.nav.button.size | --p-galleria-thumbnail-nav-button-size | 썸네일 내비게이션 버튼의 크기 |
| galleria.thumbnail.nav.button.border.radius | --p-galleria-thumbnail-nav-button-border-radius | 썸네일 내비게이션 버튼의 테두리 반경 |
| galleria.thumbnail.nav.button.gutter | --p-galleria-thumbnail-nav-button-gutter | 썸네일 내비게이션 버튼의 거터 |
| galleria.thumbnail.nav.button.focus.ring.width | --p-galleria-thumbnail-nav-button-focus-ring-width | 썸네일 내비게이션 버튼의 포커스 링 두께 |
| galleria.thumbnail.nav.button.focus.ring.style | --p-galleria-thumbnail-nav-button-focus-ring-style | 썸네일 내비게이션 버튼의 포커스 링 스타일 |
| galleria.thumbnail.nav.button.focus.ring.color | --p-galleria-thumbnail-nav-button-focus-ring-color | 썸네일 내비게이션 버튼의 포커스 링 색 |
| galleria.thumbnail.nav.button.focus.ring.offset | --p-galleria-thumbnail-nav-button-focus-ring-offset | 썸네일 내비게이션 버튼의 포커스 링 오프셋 |
| galleria.thumbnail.nav.button.focus.ring.shadow | --p-galleria-thumbnail-nav-button-focus-ring-shadow | 썸네일 내비게이션 버튼의 포커스 링 그림자 |
| galleria.thumbnail.nav.button.hover.background | --p-galleria-thumbnail-nav-button-hover-background | 썸네일 내비게이션 버튼의 호버 배경 |
| galleria.thumbnail.nav.button.color | --p-galleria-thumbnail-nav-button-color | 썸네일 내비게이션 버튼의 색 |
| galleria.thumbnail.nav.button.hover.color | --p-galleria-thumbnail-nav-button-hover-color | 썸네일 내비게이션 버튼의 호버 색 |
| galleria.thumbnail.nav.button.icon.size | --p-galleria-thumbnail-nav-button-icon-size | 썸네일 내비게이션 버튼 아이콘의 크기 |
| galleria.caption.background | --p-galleria-caption-background | 캡션의 배경 |
| galleria.caption.color | --p-galleria-caption-color | 캡션의 색 |
| galleria.caption.padding | --p-galleria-caption-padding | 캡션의 패딩 |
| galleria.indicator.list.gap | --p-galleria-indicator-list-gap | 인디케이터 목록의 간격 |
| galleria.indicator.list.padding | --p-galleria-indicator-list-padding | 인디케이터 목록의 패딩 |
| galleria.indicator.button.width | --p-galleria-indicator-button-width | 인디케이터 버튼의 너비 |
| galleria.indicator.button.height | --p-galleria-indicator-button-height | 인디케이터 버튼의 높이 |
| galleria.indicator.button.active.background | --p-galleria-indicator-button-active-background | 인디케이터 버튼의 활성 배경 |
| galleria.indicator.button.border.radius | --p-galleria-indicator-button-border-radius | 인디케이터 버튼의 테두리 반경 |
| galleria.indicator.button.focus.ring.width | --p-galleria-indicator-button-focus-ring-width | 인디케이터 버튼의 포커스 링 두께 |
| galleria.indicator.button.focus.ring.style | --p-galleria-indicator-button-focus-ring-style | 인디케이터 버튼의 포커스 링 스타일 |
| galleria.indicator.button.focus.ring.color | --p-galleria-indicator-button-focus-ring-color | 인디케이터 버튼의 포커스 링 색 |
| galleria.indicator.button.focus.ring.offset | --p-galleria-indicator-button-focus-ring-offset | 인디케이터 버튼의 포커스 링 오프셋 |
| galleria.indicator.button.focus.ring.shadow | --p-galleria-indicator-button-focus-ring-shadow | 인디케이터 버튼의 포커스 링 그림자 |
| galleria.indicator.button.background | --p-galleria-indicator-button-background | 인디케이터 버튼의 배경 |
| galleria.indicator.button.hover.background | --p-galleria-indicator-button-hover-background | 인디케이터 버튼의 호버 배경 |
| galleria.inset.indicator.list.background | --p-galleria-inset-indicator-list-background | 삽입형 인디케이터 목록의 배경 |
| galleria.inset.indicator.button.background | --p-galleria-inset-indicator-button-background | 삽입형 인디케이터 버튼의 배경 |
| galleria.inset.indicator.button.hover.background | --p-galleria-inset-indicator-button-hover-background | 삽입형 인디케이터 버튼의 호버 배경 |
| galleria.inset.indicator.button.active.background | --p-galleria-inset-indicator-button-active-background | 삽입형 인디케이터 버튼의 활성 배경 |
| galleria.close.button.size | --p-galleria-close-button-size | 닫기 버튼의 크기 |
| galleria.close.button.gutter | --p-galleria-close-button-gutter | 닫기 버튼의 거터 |
| galleria.close.button.background | --p-galleria-close-button-background | 닫기 버튼의 배경 |
| galleria.close.button.hover.background | --p-galleria-close-button-hover-background | 닫기 버튼의 호버 배경 |
| galleria.close.button.color | --p-galleria-close-button-color | 닫기 버튼의 색 |
| galleria.close.button.hover.color | --p-galleria-close-button-hover-color | 닫기 버튼의 호버 색 |
| galleria.close.button.border.radius | --p-galleria-close-button-border-radius | 닫기 버튼의 테두리 반경 |
| galleria.close.button.focus.ring.width | --p-galleria-close-button-focus-ring-width | 닫기 버튼의 포커스 링 두께 |
| galleria.close.button.focus.ring.style | --p-galleria-close-button-focus-ring-style | 닫기 버튼의 포커스 링 스타일 |
| galleria.close.button.focus.ring.color | --p-galleria-close-button-focus-ring-color | 닫기 버튼의 포커스 링 색 |
| galleria.close.button.focus.ring.offset | --p-galleria-close-button-focus-ring-offset | 닫기 버튼의 포커스 링 오프셋 |
| galleria.close.button.focus.ring.shadow | --p-galleria-close-button-focus-ring-shadow | 닫기 버튼의 포커스 링 그림자 |
| galleria.close.button.icon.size | --p-galleria-close-button-icon-size | 닫기 버튼 아이콘의 크기 |
더 알아보기 (Learn more)
요약: Galleria는 value 배열과 item·thumbnail 템플릿만으로 기본 갤러리를 구성하고, 자동 재생·캡션·반응형 옵션·전체 화면 같은 속성을 얹어 확장할 수 있어요. 세부 속성과 테마 토큰은 위의 표를 참고하세요.