Skip to content

Tag

A highlighted inline piece of text.

See all the examples and details in the Storybook.

Usage

tsx
import { Tag } from "@samgl/graffiti-ui";

const MyTag = () => {
  return <Tag $color="cyan" label="Hello, this is a tag" />;
};

Props

PropTypeDefaultOptionalDescription
labelstringThe text to display inside the tag.
$colorstringThe colour of the tag. Should match a colour from the theme.
classNamestringThe class name of the component, generally used when extending the component with a styled component.