Skip to main content
K
Last modified: 24/Jun/2024

Status Bar

The Status bar component is used to give extra context/feedback for our users.The component is based in three elements: bar, text label, icon and a description. In some cases Text Label and the Icon will trigger a Popover to give extra information about the status. At least the component should show the bar and the text label.

This component can handle 4 different statuses:

  • Success: Use this when the user needs to understand that everything is correct, there's no need for them to make any action
  • Warning: Everything is correct, but we want to warn the user of an unexpected outcome or a future problem
  • Error: Use this when the user needs to make an action or needs guidance for next steps
  • Updating: Use when user needs to wait until an action is complete.

You can choose ONLY one of the following two means of providing more information about the component.

  • Fill the popoverContent prop, which will give you a popover with a help icon
  • Fill the description prop which will give you a description next to the label with a wrench icon

If you'd like the component to handle steps, fill out both the maxValue and currentValue props.

#Usage

import { StatusBar } from '@kinsta/stratus' const MyComponent = () => ( <StatusBar state="error" label="Label"/> )

#Props

#state
Required
StatusBarState
Determines the colour of the statusbar
#isLoading
boolean
Display a loading animation
false
#isDisabled
boolean
Give the status bar a disabled look
false
#label
string | ReactElement<any, string | JSXElementConstructor<any>>
Label text
#description
string | ReactElement<any, string | JSXElementConstructor<any>>
If this value is given, it will render the given text with a wrench next to the label
#popoverContent
PopoverConfig
If this value is given, the label will obtain a help icon and become a trigger for a popover that contains this value
#maxStep
number
Max number of steps available
1
#currentStep
number
Step it's currently on
1