yarn add @react-spectre/label
npm install @react-spectre/label --save
There is one single component used for labels: Label
.
import { Label } from '@react-spectre/label'
A Label can have 5 different color using props: primary
, secondary
, success
, warning
and error
.
<Label primary>primary</Label>
<Label secondary>secondary</Label>
<Label success>success</Label>
<Label warning>warning</Label>
<Label error>error</Label>
A Label can have rounded corner using the rounded
prop
<Label rounded>rounded</Label>
<Label rounded primary>rounded primary</Label>
A Label can be rendered in a <small />
element.
<Label small>small</Label>
<Label small primary>small primary</Label>
<Label small primary rounded>small primary rounded</Label>