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

Progress

원문 보기 위키 갱신

Progress (진행률)

작업의 현재 진행 상황을 보여주는 컴포넌트예요. 진행률 표시부터 상태 아이콘까지 상황에 맞게 꾸밀 수 있죠.

출처: 문서

본문

소개

작업의 현재 진행 상황을 보여줄 때 사용해요.

설치

import { createApp } from 'vue'
import { Progress } from '@nutui/nutui'

const app = createApp()
app.use(Progress)

기본 사용법

demo: progress basic

커스텀 스타일

demo: progress color

퍼센트 숨기기

demo: progress text

텍스트 안에 넣기

demo: progress inside

커스텀 콘텐츠

demo: progress content

커스텀 크기

size: small, base, large .

demo: progress size

상태 표시

demo: progress status

동적 변경

demo: progress change

API

Props

Attribute 설명 Type 기본값
percentage 퍼센트 number 0
is-show-percentage 퍼센트 기호를 표시할지 여부 boolean true
stroke-color 스트로크 색 string #f30
stroke-width 스트로크 너비 string -
size 진행 바와 텍스트 크기, small/base/large string -
show-text 텍스트를 보여줄지 여부 boolean true
text-inside 진행 바 텍스트 위치(false:바깥,true:안) boolean false
text-color 진행 바 텍스트 색 설정 string #333
text-background 진행 바 텍스트 배경색 설정 string -
status 진행 바의 현재 상태, active(애니메이션 효과 표시) icon(아이콘 라벨 표시) string text

Slots

이름 설명
icon-name 오른쪽 아이콘 콘텐츠

Types v4.3.3

컴포넌트는 다음 타입 정의를 내보내요:

import type {
  ProgressSize,
  ProgressStatus,
  ProgressProps,
  ProgressInstance
} from '@nutui/nutui';

테마 (Theming)

CSS Variables

컴포넌트는 스타일을 커스터마이즈할 수 있는 CSS 변수를 제공해요. ConfigProvider 컴포넌트를 참고하세요.

이름 기본값
--nut-progress-inner-background-color linear-gradient(135deg,var(--nut-primary-color) 0%,var(--nut-primary-color-end) 100%)
--nut-progress-insidetext-background var(--nut-progress-inner-background-color)
--nut-progress-outer-background-color #f3f3f3
--nut-progress-outer-border-radius 12px
--nut-progress-insidetext-border-radius 5px
--nut-progress-insidetext-padding 3px 5px 3px 6px
--nut-progress-small-height 5px
--nut-progress-small-text-font-size 7px
--nut-progress-small-text-line-height 10px
--nut-progress-small-text-padding 2px 4px
--nut-progress-base-height 10px
--nut-progress-base-text-font-size 9px
--nut-progress-base-text-line-height 13px
--nut-progress-base-text-padding var(--nut-progress-insidetext-padding)
--nut-progress-large-height 15px
--nut-progress-large-text-font-size 13px
--nut-progress-large-text-line-height 18px
--nut-progress-large-text-padding var(--nut-progress-insidetext-padding)

더 알아보기 (Learn more)