본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Vue ProgressSpinner 컴포넌트

원문 보기 위키 갱신

ProgressSpinner는 처리 상태를 나타내는 인디케이터예요. 데이터를 로딩하는 동안 회전하는 스피너를 보여 주는 데 쓰이죠.

출처: 문서

본문

Vue ProgressSpinner Component

ProgressSpinner is a process status indicator.

Import

import ProgressSpinner from 'primevue/progressspinner';

Accessibility

Screen Reader ProgressSpinner 컴포넌트는 progressbar role을 사용해요. 컴포넌트를 설명하는 값은 aria-labelledby와 aria-label 프로퍼티로 정의할 수 있어요. Keyboard Support 이 컴포넌트에는 인터랙티브 요소가 없어요.

<ProgressSpinner aria-label="Loading" />

Basic

기본적으로 무한 회전 애니메이션이 표시돼요.

<ProgressSpinner />

Custom

ProgressSpinner는 style, strokeWidth, fill, animationDuration 같은 스타일링 프로퍼티로 커스터마이징할 수 있어요.

<ProgressSpinner style="width: 50px; height: 50px" strokeWidth="8" fill="transparent" animationDuration=".5s" aria-label="Custom ProgressSpinner" />
Composition API Example
<template>
    <div class="card flex justify-center">
        <ProgressSpinner style="width: 50px; height: 50px" strokeWidth="8" fill="transparent"
            animationDuration=".5s" aria-label="Custom ProgressSpinner" />
    </div>
</template>

<script setup>
<\/script>

Progress Spinner

Props

Name Type Default Description
strokeWidth string 2 Width of the circle stroke.
fill string - Color for the background of the circle.
animationDuration string 2s Duration of the rotate animation.
dt any - It generates scoped CSS variables using design tokens for the component.
pt PassThrough - Used to pass attributes to DOM elements inside the component.
ptOptions any - Used to configure passthrough(pt) options of the component.
unstyled boolean false When enabled, it removes component related styles in the core.

Pass Through Options

Name Type Description
root ProgressSpinnerPassThroughOptionType Used to pass attributes to the root's DOM element.
spin ProgressSpinnerPassThroughOptionType Used to pass attributes to the spinner's DOM element.
circle ProgressSpinnerPassThroughOptionType Used to pass attributes to the circle's DOM element.
hooks any Used to manage all lifecycle hooks.

Theming

CSS Classes

Class Description
p-progressspinner Class name of the root element
p-progressspinner-spin Class name of the spin element
p-progressspinner-circle Class name of the circle element

Design Tokens

Token CSS Variable Description
progressspinner.color.one --p-progressspinner-color-one Color one of root
progressspinner.color.two --p-progressspinner-color-two Color two of root
progressspinner.color.three --p-progressspinner-color-three Color three of root
progressspinner.color.four --p-progressspinner-color-four Color four of root

더 알아보기 (Learn more)