Skip to content

CSS: progress

.instui-progress · stable — Determinera progressbárga maid leat fargga metra, sizedet ja valmmas vástádussančállin.

.value lea .bar gaskkasšovdna, båda eanet root-muhtun — mas čállean go progress-circle čalmmihaš .value osan. InstUI ii leat indeterminate stáhta; :indeterminate lea pantoken-dutkama deaddilohčči (native <progress> ilman value atributta), animere .bar lasihuvvon segmenttas ja fabmidit .value gos ii leat dearvvas guktieaddji ovddasvuohta. <meter> ii leat indeterminate stáhta, jadi das ii boađege.

Source: progress.css

Guhkkinjohka

Buktit natála <progress> zero-basis task-completion ránje ja <meter> go minimum lea ean-muhtun. Geavahuvvut jaokto element accessibala name vuosttaš <label> sisosa dahje searvvuheapmi erenoamáš <label> ovttasvuođaheami for ja id dego náit.

Buktáhašvuohta

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

Exempla

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>

Structura

// 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;

Modifisuvnnat

ModifisererDeskripción
.-color-brandBranda metrra fáhppu.
.-color-dangerFáránus metrra fáhppu.
.-color-infoInfo-metrra fáhppu.
.-color-inverseTumma guovddášáiggiin.
.-color-primary-inverseOvddas-guovtti (primary inverse) metrra fáhppu.
.-color-successOahppat métrra fáhppu.
.-color-warningGuhkkin metrra fáhppu.
.-meter-color-alertDeprekereda — use .-color-warning.
.-meter-color-brandDeprekereda — use .-color-brand.
.-meter-color-dangerDeprekereda — use .-color-danger.
.-meter-color-infoDeprekereda — use .-color-info.
.-meter-color-successDeprekereda — use .-color-success.
.-meter-color-warningDeprekereda — use .-color-warning.
.-render-value-insideRenderrá .value trackii sisdoahtin, almmuheapmái dál, nu liige sisdoahtin; stailahit son luondduálbmogiid metra fargga ovttasbargu.
.-should-animateInteraction — Animate meter changes over half a second.
.-size-largeLáhppi. Long-form alias -size-lg.
.-size-lgLáhppi.
.-size-mdMeanta (default).
.-size-mediumMeanta (default). Vuosttaš alias birra -size-md.
.-size-smGosse (Small).
.-size-smallGosse. Long-form alias -size-sm.
.-size-x-smallExtra gosse. Long-form alias -size-xs.
.-size-xsExtra gosse.

Dála

DálaDeskripción
.barFargga metra bárgga.
.valueVástádussatext liige bárgga.

Pseudo-elementtat

Pseudo-elementDeskripción
:::indeterminateEalá, ii leat InstUI osa. Gáhttu csakke dahkat nugo native <progress> maid falta value atributta; animere .bar lasihuvvon segmenttas ja fabmidit .value.
::afterDovdat tracka álmmuhusas gullet dihtii almmuheapmái ovddas metra, nu go guovllu borde ja álmmuhusa guovllu borre leat oddasašuvvan temaide gaskkas.

Stáhtat

StátusaDeskripción
:indeterminate

Ovvun-propertijat

PropertyTypeDefaultDeskripción
--max<number>Máksimum progress-válggu (default 100).
--min<number>Minimuvn metrra válggu (default 0).
--value<number>Dáss current progress vástádus.
--value-max<number>@alias {@link --max} Máksimum progress-válggu (default 100).
--value-now<number>@alias Alias --value-bargguidii.

Animasjonat

AnimasjonDeskripción
pantoken-progress-indeterminate

Tokenat gaskkalit

TokenTypeVaššun
--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

Browsera geavahit

  • Skoppe metra osain reavat @scope at-rule-voinnin; browserat maid ii gávdno @scope supporta fárrit sáhka dál skopet reavat.

Dálkkodat