Askr documentation
Generated API snapshot

@askrjs/ui/progress

Exports from the declarations published in @askrjs/ui. Signatures reflect the published artifact.

Exports

This entrypoint publishes 8 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

Progresstype

Progress: (props: ProgressProps) => JSX.Element

Renders the `progress` part of `progress` with `role="progressbar"`.

PROGRESS_A11Y_CONTRACTtype

PROGRESS_A11Y_CONTRACT: { readonly ROLE: "progressbar"; readonly DATA_ATTRIBUTES: { readonly slot: "data-slot"; readonly state: "data-state"; readonly percentage: "data-percentage"; }; readonly VALUE_NOW_ATTRIBUTE: "aria-valuenow"; readonly VALUE_MIN_ATTRIBUTE: "aria-valuemin"; readonly VALUE_MAX_ATTRIBUTE: "aria-valuemax"; readonly INDICATOR_MARKER: "data-progress-indicator"; readonly INDICATOR_PERCENTAGE_ATTRIBUTE: "data-percentage"; }

WAI-ARIA progressbar contract for linear progress.

ProgressA11yContracttype

ProgressA11yContract: typeof PROGRESS_A11Y_CONTRACT

Type of the Progress A11y Contract object.

ProgressIndicatortype

ProgressIndicator: { (props: ProgressIndicatorProps): JSX.Element; (props: ProgressIndicatorAsChildProps): JSX.Element; }

Renders the `progress-indicator` part of `progress`. Supports polymorphic rendering via `asChild`.

ProgressIndicatorAsChildPropstype

ProgressIndicatorAsChildProps: BoxAsChildProps

Props for the `asChild` (polymorphic) rendering of Progress Indicator.

asChild
asChild: true;
children
children: JSXElement;
ref
ref?: Ref<Element>;

ProgressIndicatorPropstype

ProgressIndicatorProps: BoxProps<'div', HTMLDivElement>

Props for Progress Indicator.

asChild
asChild?: false | undefined;
children
children?: unknown;
ref
ref?: Ref<HTMLDivElement>;

ProgressOwnPropstype

ProgressOwnProps: {
  children?: unknown;
  id?: string;
  value?: number | null;
  max?: number;
  getValueLabel?: (value: number | null, max: number) => string;
}

Own props for Progress, before merging with native element attributes.

children
children?: unknown;
getValueLabel
getValueLabel?: ((value: number | null, max: number) => string) | undefined;
id
id?: string | undefined;
max
max?: number | undefined;
value
value?: number | null | undefined;

ProgressPropstype

ProgressProps: BoxProps<'div', HTMLDivElement> & ProgressOwnProps

Props for Progress.

asChild
asChild?: false | undefined;
children
children?: unknown;
getValueLabel
getValueLabel?: ((value: number | null, max: number) => string) | undefined;
id
id?: string | undefined;
max
max?: number | undefined;
ref
ref?: Ref<HTMLDivElement>;
value
value?: number | null | undefined;