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

MetricCard

Card to show metrics of a particular variable number.

#Usage

import { MetricCard } from '@kinsta/stratus' const MyComponent = () => ( <MetricCard title="title" deviation={9} value={190} helpText="help text" /> )

#Props

#title
string | (ReactElement<any, string | JSXElementConstructor<any>> & string)
The title of the card
#value
Required
number
The value of the metric
#deviation
Required
number
To show the change of the value. If the number is negative its colour is red and if it's positive it's green
#helpText
string | ReactElement<any, string | JSXElementConstructor<any>>
To show a help icon with a tooltip
#hasBackground
boolean
Renders a box-shadow under the card
true

#Types

  • MetricCardProps: props of the MetricCard component processed by stratus

Read more about types here