Skip to content

CSS: progress

.instui-progress · estab — Yon ba pwogrè detèmine ak yon mezi koulè, gwosè, ak yon etikèt valè opsyonèl.

.value se yon frè .bar, toulede pitit rasin lan — sa a reflete fason progress-circle anbrase pwòp pati .value li a. InstUI pa gen yon eta endetèmine; :indeterminate se yon pi bon sipozisyon sèlman nan pantoken (natif <progress> san atribi value), li anime .bar kòm yon segman glise epi li kache .value paske pa gen yon nimewo ki gen sans pou montre. <meter> pa gen eta endetèmine, kidonk li pa afekte.

Source: progress.css

Aksè

Sèvi ak natif <progress> pou yon ranje konplèman travay ki baze sou zewo epi <meter> lè minimòm lan pa zewo. Bay swa eleman yon non aksesib lè w mete l anndan <label> oswa asosye yon <label> separe atravè valè for ak id ki matche.

Itilizasyon

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/progress.css";

Egzanp

Nested label

html
<label>
  Uploading Document: <progress class="instui-progress -color-brand" value="70">70%</progress>
</label>

External label

html
<label for="storage-used">Storage used</label>
<meter id="storage-used" class="instui-progress -color-warning" min="20" value="40" max="60">50%</meter>

Estrikti

// Variant: nested-label

text
label
  .instui-progress
    .bar
    .value

// Variant: external-label

text
label
.instui-progress
  .bar
  .value
flowchart TD subgraph sg0 ["nested-label"] n1["label"]:::cssdoc-root n2(".instui-progress"):::cssdoc-part n3(".bar"):::cssdoc-part n4(".value"):::cssdoc-part end subgraph sg5 ["external-label"] n6["label"]:::cssdoc-root n7[".instui-progress"]:::cssdoc-root n8(".bar"):::cssdoc-part n9(".value"):::cssdoc-part end n2 --> n3 n2 --> n4 n1 --> n2 n7 --> n8 n7 --> n9 classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

Modifikatè

ModifikatèDeskripsyon
.-color-brandKoulè mezi mak mak marca.
.-color-dangerKoulè mezi danje.
.-color-infoKoulè mezi enfòmasyon.
.-color-inversePou background fè nwa.
.-color-primary-inverseKoulè mezi sou fòn fonse (envès prensipal).
.-color-successKoulè mezi siksè.
.-color-warningKoulè mezi avètisman.
.-meter-color-alertDepreke — use .-color-warning.
.-meter-color-brandDepreke — use .-color-brand.
.-meter-color-dangerDepreke — use .-color-danger.
.-meter-color-infoDepreke — use .-color-info.
.-meter-color-successDepreke — use .-color-success.
.-meter-color-warningDepreke — use .-color-warning.
.-render-value-insideAfiche .value anndan tras la, alinye sou kòmansman li, olye de bò kote li; style li pou li lizib sou koulè mezi a.
.-should-animateInteraction — Animate meter changes over half a second.
.-size-largeGwo. Alias long fòm pou -size-lg.
.-size-lgGwo.
.-size-mdMwayen (default).
.-size-mediumMwayen (default). Aliaz long pou -size-md.
.-size-smTi.
.-size-smallTi. Alias long fòm pou -size-sm.
.-size-x-smallEkstra piti. Alias long fòm pou -size-xs.
.-size-xsEkstra piti.

Pati

PatiDeskripsyon
.barBa mezi ki plen nan.
.valueTèks valè a bò kote ba a.

Pseudo-eleman

Pseudo-elemanDeskripsyon
:::indeterminateCustom, pa pati nan InstUI. Aplike sèlman sou yon natif <progress> ki pa gen atribi value li; li anime .bar kòm yon segman glise epi li kache .value.
::afterDesine règ anba tras la kòm pwòp kouch li sou mezi a, konsa fwontyè konplè a ak fwontyè anba a rete endepandan atravè tèm yo.

Eta

EtaDeskripsyon
:indeterminate

Pwopriyete koutim

PwopriyeteTipPa defoDeskripsyon
--max<number>Valè maksimòm pwogrè a (default 100).
--min<number>Valè minimòm mezi a (default 0).
--value<number>Valè pwogrè aktyèl la.
--value-max<number>@alias {@link --max} Valè maksimòm pwogrè a (default 100).
--value-now<number>@alias Aliaz pou --value.

Animasyon

AnimasyonDeskripsyon
pantoken-progress-indeterminate

Tokens konsome

TokenTipValè
--instui-color-background-brand<color>LightDarklight-dark(#1D354F, #EEF4FD)
--instui-color-background-error<color>#E62429
--instui-color-background-info<color>#2B7ABC
--instui-color-background-success<color>#03893D
--instui-color-background-warning<color>#CF4A00
--instui-component-progress-bar-border-color<color>LightDarklight-dark(#1D354F, #EEF4FD)
--instui-component-progress-bar-border-color-inverse<color>LightDarklight-dark(#ffffff, #6A7883)
--instui-component-progress-bar-border-radius<length>0.5rem
--instui-component-progress-bar-font-family[ <font-family-name> | <generic-font-family> ]#Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-progress-bar-font-weight<integer>400
--instui-component-progress-bar-large-height<length>2rem
--instui-component-progress-bar-line-height<percentage>125%
--instui-component-progress-bar-medium-height<length>1.5rem
--instui-component-progress-bar-medium-value-font-size<length>1rem
--instui-component-progress-bar-meter-color-brand-inverse<color>LightDarklight-dark(#ffffff, #10141A)
--instui-component-progress-bar-small-height<length>1rem
--instui-component-progress-bar-text-color<color>LightDarklight-dark(#576773, #AAB0B5)
--instui-component-progress-bar-text-color-inverse<color>LightDarklight-dark(#ffffff, #1C222B)
--instui-component-progress-bar-track-bottom-border-color<color>#00000000
--instui-component-progress-bar-track-bottom-border-color-inverse<color>#00000000
--instui-component-progress-bar-track-bottom-border-width<length>0.0625rem
--instui-component-progress-bar-track-color<color>#00000000
--instui-component-progress-bar-track-color-inverse<color>#00000000
--instui-component-progress-bar-value-padding<length>0.5rem
--instui-component-progress-bar-x-small-height<length>0.5rem

Sipò navigatè

  • Skope règleman pati mezi yo ak at-règleman @scope; navigatè ki pa sipòte @scope inyore règleman skope sa yo.

Ki gen rapò