--- /** core/scss/ui/_progress.scss `.progress-{size}` modifier classes */ export type ProgressSize = 'sm' | 'lg' | 'xl' interface Props { value?: number | undefined values?: number[] /** per-bar colors for the `values` variant, e.g. ['blue', 'red'] */ colors?: string[] color?: string | undefined size?: ProgressSize | undefined class?: string width?: string id?: string indeterminate?: boolean striped?: boolean animated?: boolean showValue?: boolean /** remaining attributes (data-*, aria-*, …) are forwarded to the root element */ [key: string]: unknown } const { value, values, colors: colorsProp, color, size, class: className, width, id, indeterminate, striped, animated, showValue, ...rest } = Astro.props const percentage = value ?? 0 const colors = color ? [color] : (colorsProp ?? []) const valueList = values const classes = ['progress', size && `progress-${size}`, className] ---
{ indeterminate ? (
) : valueList ? ( valueList.map((v, i) =>
) ) : (
{showValue ? `${percentage}%` : {percentage}% Complete}
) }