Fusuma

Components / Components

segments

A segmented bar lit to permille thousandths, as many ticks as fit.

Try it

This is the Progress page of the gallery, running in your browser: segments is on it, and it is the real widget. Press Run, then use it.

Live: Progress, where segments is usedOpen full size

Also on this pageprogress

A segmented bar lit to permille thousandths, as many ticks as fit.

A bar of ticks, as many as fit; .count(n) fixes how many.

Signature

pub const fn segments(permille: u16) -> Segments

Methods

  • .count(count: u8) -> Self — Exactly count ticks (as many as fit by default).

Example

use fusuma::segments;
let view = segments(700).count(10);
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.nodes(), 1);

All components · Source