Skip to content

Pill Button

The PillButton component renders a button with a pill-shaped design.

Pill buttons are secondary interactive elements used for filtering, tagging, or toggling options whitin the interface. They are visually lighter than standard buttons and should never be used for primary actions.

There are two main use cases:

  • Selectable Pills: used to represent filters or toggles that can be selected/deselected.
  • Informational Pills: used to highlight contextual information (e.g. labels or statuses).

PillButtonProperties extends <React.HTMLAttributes<HTMLButtonElement>> which means it includes all standard HTML attributes that can be applied to a button element.

PropTypeDescriptionOptional
textstringThe text label displayed inside the pill button
classNameClassValueCustom class names applied to the button element
buttonSize'sm' | 'md' | 'lg'Defines the size of the button
isHighlightbooleanIndicates if the button should appear highlighted
isSelectedbooleanIndicates if the button is currently selected
isCtabooleanMarks the button as a Call-To-Action (CTA)
onOverlaybooleanIndicates if the button is displayed on an overlay
leadingIconToyotaIcon | LexusIconIcon displayed before the text
trailingIconToyotaIcon | LexusIconIcon displayed after the text
import { PillButton } from '@tmedxp/react-components';
const PillButtonExample = () => {
return <PillButton text="Pill Button" />;
};
export { PillButtonExample };

Try the Link Button component in storybook:

https://www.figma.com/design/BMP7JhfVGX3h47BvUD0xXj/03-Components?node-id=2973-2092&t=QWmLOxmMlRfykQTB-0