code/tamagui.dev/data/docs/components/progress/1.0.0.mdx
<Description>Show percent completion with a progress bar</Description>
<HeroContainer showAnimationDriverControl> <ProgressDemo /> </HeroContainer><Highlights features={[ 'Sizable, themeable, animatable.', 'Compound component API for complete control.', <span> Adheres to the{' '} <a href="https://www.w3.org/TR/wai-aria-1.2/#progressbar"> progressbar role requirements </a> </span>, ]} />
Progress is already installed in tamagui, or you can install it independently:
npm install @tamagui/progress
The value property controls the percent, but you can override it by adjusting the x property.
import { Button, Progress } from 'tamagui'
export default () => (
<Progress value={60}>
<Progress.Indicator animation="bouncy" />
</Progress>
)
Progress extends ThemeableStack, getting Tamagui standard props, plus:
<PropsTable
data={[
{
name: 'size',
required: false,
type: '"small" | "large"',
},
{
name: 'value',
required: false,
type: 'number | null',
description: Control the percent progress.,
},
{
name: 'max',
required: false,
type: 'number',
},
]}
/>
Progress.Indicator extends ThemeableStack, getting Tamagui standard props.