Meridianby Commenda
Components

Pill

A property people set from a filter row.

A property you can set, in a round 28 pill: a topic, a region, a format or a date. Clicking it opens its menu. On the site Pills filter the guides library, events and the integrations directory. Pills are properties, not values (Tag), statuses (Badge) or actions (Button).

empty
set
more than one: +N
row more: IconButton

Usage

Example.tsx
import { Pill } from "@commenda/meridian/ui/pill";

<Pill label="Topic" value={topic} leading={<Tag01Icon />} onClick={openTopicMenu} />;

Empty or set

Empty shows the property name in Soft Pearl 900. Set shows the value in 1000. More than one value adds +N. The row’s more menu is an IconButton.

empty
set
more than one: +N
row more: IconButton

Leading

One 16 slot for whatever identifies the value: an icon, a status, a person’s avatar or a country’s flag.

icon
status
flag

States

Hover and open fill Soft Pearl 200, color only. Open holds the hover fill while its menu shows. Focus adds the blue ring, outside the pill. Read-only drops the fill and the hairline.

default
disabled
Nov 18read-only

In a filter row

A row of filters above the guides library: topic, region and format, with the more menu for the rest.

Guides and playbooks

Anatomy

Background with a 0.5 Soft Pearl 300 hairline, fully round, 8 on the left and 12 on the right, 6 between parts. Label/12 Strong in Soft Pearl 1000, the count in 800. The leading slot is 16. Height 28.

API reference

PropTypeDescription
labelRequiredstringProperty name, retained in the accessible name when a value is shown.
valuestringFrom Pathfinder.
leadingReactNodeFrom Pathfinder.
additionalCountnumberNumber of additional values beyond the displayed value.
readOnlybooleanFrom Pathfinder.

Best practices

  • Use a Pill for a property people can set: a topic, region, format or date on a filter row. Clicking it opens that property’s menu.
  • A value chosen inside a field is a Tag, a status is a Badge, and an action is a Button. A Pill never removes itself and never runs an action.
  • An empty Pill names its property ("Topic", "Region") in Soft Pearl 900, so a row shows what is not set. Once set, it shows the value.
  • More than one value shows the first and +N; the menu lists them all. Labels truncate past 240 and show in full on hover.
  • Lead with what identifies the value: a country’s flag, a person’s avatar, a status icon. Otherwise use the property’s icon.
  • A row of Pills sits 6 apart and wraps at its container’s edge. The row’s more menu is IconButton tertiary sm, not a Pill.
  • Source: Pathfinder Pill. Meridian keeps it as is.

On this page