The structure provided below can help you identify and understand a Progress component's various parts.
exportdefault()=>(
<Progress>
<ProgressFilledTrack/>
</Progress>
)
Component Props
This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.
Progress
It inherits all the properties of React Native's View component.
Prop
Type
Default
Description
value
number
-
It is used to set the progress of the progress bar
Descendants Styling Props
Props to style child components.
Sx Prop
Description
_filledTrack
Prop to style ProgressFilledTrack Component
ProgressFilledTrack
It also inherits all the properties of React Native's View component.
Accessibility
We have outlined the various features that ensure the Fab component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards. Adheres to the WAI-ARIA design pattern.
Keyboard
Tab: Moves focus to the next focusable element.
Screen Reader
VoiceOver: When the Progress is focused, the screen reader will announce it's a progress and it's current progress indicator.
Themed
The themed version of the component is a pre-styled version of the component, which allows you to quickly integrate the component into your project. The component's design and functionality are fully defined, allowing you to focus on the more important aspects of your project. To know more about Themed Library please visit this link.
Props
Progress component is created using View component from react-native. It extends all the props supported by React Native View, utility props and the props mentioned below.
Progress
Name
Value
Default
size
xs | sm | md | lg | xl | 2xl
md
Note: These props are exclusively applicable when utilizing the default configuration of gluestack-ui/config. If you are using a custom theme, these props may not be available.
Examples
The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.
Value
Progress component with value
<VStackspace="lg">
<Textsize="lg">Downloading 55%</Text>
<Progressvalue={55}w="$80"h="$1">
<ProgressFilledTrackh="$1"/>
</Progress>
</VStack>
Color
You can add track color to progress bar as per our needs.
<VStackspace="3xl">
<Progressvalue={46}w="$96"h="$2"size="sm">
<ProgressFilledTrackbg="$emerald600"/>
</Progress>
<Progressvalue={46}w="$96"h="$2"size="sm">
<ProgressFilledTrackbg="$amber600"/>
</Progress>
<Progressvalue={46}w="$96"h="$2"size="sm">
<ProgressFilledTrackbg="$fuchsia600"/>
</Progress>
<Progressvalue={46}w="$96"h="$2"size="sm">
<ProgressFilledTrackbg="$cyan600"/>
</Progress>
</VStack>
Custom
You can customize the progress bar. Below is the example where we have change the theme of progress bar.
<VStackspace="lg">
<Heading>Internal Storage</Heading>
<Progressvalue={46}w={410}h={8}bg="$lime100">
<ProgressFilledTrackh={8}bg="$lime500"/>
</Progress>
<Textsize="md">14GB</Text>
</VStack>
Unstyled
All the components in gluestack-ui are unstyled by default. To customize your UI using the extendedTheme, please refer to this link. The import names of components serve as keys to customize each component.
Spec Doc
Explore the comprehensive details of the Progress in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.