mica

Example

Basic usage

<progress max="100" value="33"></progress>
<meter min="0" max="100" low="60" high="85" optimum="30" value="74"></meter>

API

Both controls use native HTML attributes and behavior. Mica adds the thin-bar presentation and status colors; it adds no attributes.

Native progress attributes

NameTypeDefaultDescription
maxpositive number1Sets the total required work.
valuenumberindeterminateSets completed work. Omit it for native indeterminate progress.

Native meter attributes

NameTypeDefaultDescription
valuenumber0The measured value.
minnumber0The lower bound of the measured range.
maxnumber1The upper bound of the measured range.
lownumberminThe upper boundary of the low range.
highnumbermaxThe lower boundary of the high range.
optimumnumberrange midpointIndicates which part of the range is optimal; Mica maps meter grades to status colors.

Accessibility

Use surrounding text or an accessible name to identify what each native control measures. Use progress for task completion and meter for a scalar value within a known range.

← contentinput & textarea →