Skip to content

Develop

Rounded buttons perfect for filters, tags, and selection interfaces.

The default size is lg.

<button class="tng-pill-button is-sm">Small</button>
<button class="tng-pill-button is-md">Medium</button>
<button class="tng-pill-button is-lg">Large</button>
<button class="tng-pill-button is-selected">Selected</button>
<button class="tng-pill-button" disabled>Disabled</button>
<button class="tng-pill-button on-overlay">Rested</button>
<button class="tng-pill-button on-overlay is-selected">
Selected
</button>
<button class="tng-pill-button on-overlay" disabled>Disabled</button>
<button class="tng-pill-button on-overlay is-cta">Rested</button>
<button class="tng-pill-button on-overlay is-cta is-selected">
Selected
</button>
<button class="tng-pill-button on-overlay is-cta" disabled>
Disabled
</button>
<button class="tng-pill-button">
<i class="tng-icon icon-ui-spinner" aria-hidden="true"></i>
<span>Loading</span>
</button>
<button class="tng-pill-button">
<span>Popular</span>
<i class="tng-icon icon-arrow-right" aria-hidden="true"></i>
</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 };