Skip to main content
K
Last modified: 4/Oct/2024

Tag

Tags are compact elements that represent an attribute.

#Usage

import { Tag } from '@kinsta/stratus' const MyComponent = () => ( <Tag theme="emerald">Beta</Tag> )

#Props

#icon
"AnalyticsAlt" | "AnalyticsCircleAlt" | "AnalyticsCircleSolidAlt" | "AnalyticsCircleSolid" | "AnalyticsCircle" | "AnalyticsSmall" | "AnalyticsSquareAlt" | "AnalyticsSquareSolidAlt" | ... 530 more ... | { ...; }
Displays and Icon on either the left or right
#size
TagSize
The size of the tag
#theme
TagTheme
Determines the color scheme
primary

#Migration guide

'emerald' - positive 'galaxy' - neutral 'graphite' - neutral 'lava' - negative 'waldo' - negative 'mercury' - neutral 'midnight' - neutral 'plum' - secondary 'ruby' - neutral 'silver' - neutral 'sky' - neutral 'sunflower' - warning 'sunset' - warning 'turquoise' - neutral 'unicorn' - secondary 'live' - positive

#Types

  • TagTheme: strings that identify the colour of the tag
  • TagProps: props of the Tag component processed by stratus
  • TagInterface: TagProps extended by HTMLAttributes<HTMLSpanElement>

Read more about types here