A pill component.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
contentstring

The content for the pill.

customAttributesobject

Custom attributes for the component.

customClassesstring | Array | object

Custom classes for the component.

iconstring

The icon to display after the content.

iconAttributesobject

Custom attributes for the icon.

iconClassesstring | Array | object

Custom classes for the icon.

iconPrefixstring

The icon prefix.

onClickfunction

The function to call when the pill is clicked.

tagNamestring

Tag to use for the pill. Defaults to button.

textAttributesobject

Custom attributes for the text.

textClassesstring | Array | object

Custom classes for the text.

refobject | null

Ref to the component.

Since
  • 4.3.0
Returns:

The pill component.

Type: 
JSX.Element