Pill
A pill-shaped button that holds a label with optional inline-start and inline-end icons.
Show codeHide code
Installation
import { Icon } from "@makeplane/propel/components/icon";
import { PillButton } from "@makeplane/propel/components/pill";Usage
import { Icon } from "@makeplane/propel/components/icon";
import { PillButton } from "@makeplane/propel/components/pill";
import { Tag, X } from "lucide-react";
export default function BasicDemo() {
return (
<div className="flex flex-wrap items-center gap-3">
<PillButton size="sm" startIcon={<Icon icon={Tag} />} label="Design" />
<PillButton size="sm" endIcon={<Icon icon={X} />} label="Dismissible" />
</div>
);
}Examples
Sizes
size runs xs 20 / sm 24 / md 28 px — the same floor as Button, stopping one rung below
its top, because a pill is inline chrome rather than a primary action. Required on both
PillButton and IconPill. See Sizing for the full ladder.
Show codeHide code
Variants
variant selects the fill treatment: outline (the default, ≈ Button secondary) or soft (≈ Button tertiary).
Show codeHide code
States
disabled and loading both drop the pill to a transparent fill with a dimmed label; loading also hides the icons, shows a spinner after the label, and blocks clicks while staying focusable.
Show codeHide code
Icon only
IconPill is a square, icon-only pill and requires an aria-label for its accessible name.
Show codeHide code
API Reference
PillButton
The ready-made pill button: grafts Base UI's `Button` behavior onto the styled `PillButton` container (behavior outer, the styled button as the render target), with an optional leading node, the `PillLabel`, an optional trailing node, and a trailing spinner while `loading`. `loading` disables the button while keeping it focusable (`aria-busy`).
IconPill
The ready-made icon-only pill: grafts Base UI's `Button` behavior onto the square `IconPill` container (behavior outer, the styled button as the render target), filling it with the icon (or a spinner while `loading`). `loading` disables the button while keeping it focusable (`aria-busy`). An `aria-label` is required for the accessible name.