Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Pill

The Pill component displays compact metadata, a status, or a small action. Keep its label short so it remains easy to scan.

Import

1
import { Pill } from '@payloadcms/ui'

Styles

Loading component example…

Use semantic styles only when the label represents that state. For example, use error for a failed state rather than decoration.

Shape

Loading component example…

Pills use Payload's standard small corner radius by default. Add rounded when the label should use a fully rounded shape.

Sizes

Loading component example…

Common props

These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.

Prop

Type

Default

Description

children

ReactNode

Visible pill content.

pillStyle

'light' | 'light-gray' | 'dark' | 'white' | 'always-white' | 'success' | 'warning' | 'error'

'light'

Sets the visual style.

size

'small' | 'medium'

'medium'

Sets the pill height and spacing.

rounded

boolean

false

Uses a fully rounded shape.

icon

ReactNode

Displays an icon beside the label.

onClick

() => void

Renders the pill as a button.

to

string

Renders the pill as a navigational link.

Was this page helpful?

Next

PillSelector