Pill
The Pill component displays compact metadata, a status, or a small action. Keep its label short so it remains easy to scan.
Import
Styles
Use semantic styles only when the label represents that state. For example, use error for a failed state rather than decoration.
Shape
Pills use Payload's standard small corner radius by default. Add rounded when the label should use a fully rounded shape.
Sizes
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 |
|---|---|---|---|
| | — | Visible pill content. |
| | | Sets the visual style. |
| | | Sets the pill height and spacing. |
| | | Uses a fully rounded shape. |
| | — | Displays an icon beside the label. |
| | — | Renders the pill as a button. |
| | — | Renders the pill as a navigational link. |
Was this page helpful?