Documentation navigation

Published API · 0.1.0-rc.1

foldkit-ui · progress

Published foldkit-ui API declarations for progress.

./progress

@wsagency/wseffect-foldkit-ui · MIT · source · MIT license · WS-AGENCY-NOTICE · THIRD-PARTY-NOTICES

This entry point is published in @wsagency/wseffect-foldkit-ui@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-foldkit-ui/progress'

Exported declarations

labelId

Returns the label element id, derived from the progress base id.

labelId: (id: string) => string

ProgressAttributes

Attribute groups provided to a Progress view.

export type ProgressAttributes<Message> = Readonly<{
    progress: ReadonlyArray<Attribute<Message>>;
    label: ReadonlyArray<Attribute<Message>>;
    track: ReadonlyArray<Attribute<Message>>;
    indicator: ReadonlyArray<Attribute<Message>>;
}>;

view

Renders an accessible progress indicator as a stateless controlled view.

view: <Message>(config: ViewConfig<Message>, h: HtmlBuilder<Message>) => Html

ViewConfig

export type ViewConfig<Message> = Readonly<{
    id: string;
    value?: number;
    min?: number;
    max?: number;
    valueText?: string | ((value: number, max: number) => string);
    ariaLabel?: string;
    ariaLabelledBy?: string;
    toView: (attributes: ProgressAttributes<Message>) => Html;
}>;