• Docs
  • Blog
    • 0.24.0

    • Switch to dark mode
    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

    Feature FlagsForLocal StoragePortalShowsplitPropsTheme

    Progress Indicators

    Progress indicators are used to show the progress of a task.

    • npm
    • source
    • recipe
    • Ark
    import { ProgressBar, CircularProgress } from '@cerberus/react'

    Usage

    Progress Bar

    The ProgressBar component is used to display a linear progress indicator. It can be used in both determinate and indeterminate states.

    Rounded
    Block

    Circular Progress

    The CircularProgress component is used to display a circular progress indicator. It will scale to the size of its container.

    25%
    50%
    75%
    100%

    Sizes

    The CircularProgress component supports different sizes via the size prop.

    25%
    50%
    75%
    100%

    Hide Value Text

    The CircularProgress component allows you to hide the value text via the hideValueText prop.

    Custom Label

    You can customize the label displayed below the value by passing a custom React node to the label prop.

    60%

    Primitives

    You can utilize the primitive components or style props to customize the progress components.

    Progress Bar

    ComponentDescription
    ProgressBarRootThe container for the ProgressBar parts
    ProgressBarBarThe percentage bar of the amount

    Circular Progress

    ComponentDescription
    CircularProgressRootThe context provider for the CircularProgress parts
    CircularProgressInfoGroupThe container for the text parts
    CircularProgressLabelThe descriptive text below the value
    CircularProgressValueTextThe value of the progress, displayed in the center circle
    CircularProgressCircleThe container of the progress
    CircularProgressCircleTrackThe track of the progress
    CircularProgressCircleRangeThe range of the progress

    CSS Variables

    Both ProgressBar and CircularProgress components expose CSS variables for easy customization.

    Variable NameDescription
    --percentThe percent value for the root.
    --radiusThe border radius value.
    --circumferenceThe circumference value for the root.
    --offsetThe offset position of the element

    Data Attributes

    Both ProgressBar and CircularProgress components expose data attributes for styling based on state.

    Data AttributeValue.
    [data-scope]progress
    [data-part]The primitive layer (e.g. 'root')
    [data-max]The value of max
    [data-value]The value of the progress
    [data-state]The state of the progress (e.g. 'loading')
    [data-orientation]The orientation of the progress (e.g. 'horizontal', 'vertical')

    API

    ProgressBar

    NameDefaultDescription
    idThe id of the CircularProgress.
    labelA description of what the progress bar is for.
    sizemdThe size of the progress bar.
    usageroundedThe style of the progress bar.
    nowThe current progress value.
    indeterminatefalseIf the progress bar is in an indeterminate state.

    CircularProgress

    NameDefaultDescription
    hideValueTextfalseHides the value text in the center of the circle.
    labelA description of what the progress bar is for.
    sizemdThe size of the circular progress.
    usagefilledThe fill style of the center circle used for the bg.

    The CircularProgress component also accepts all the props of the CircularProgressRoot primitive props

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs