Lifetime prices rise on 19 October →
Phox Elements
LAYOUT Filter and tag pills for Breakdance

Add a row of filter pills, tags and counts

Pill Group shows a row of rounded pills, each with optional text, an icon, a count badge and a link. Mark one as active for a category filter. Long rows can wrap onto new lines or scroll sideways, chosen per breakpoint.

Active pill with aria-current Icons and count badges Wrap or scroll per breakpoint
Live demos

Filter pills, icon tags and a long scrolling row

A blog category filter with counts, recipe tags with icons, and a long row of areas. Hover a linked pill to see its hover colours.

Links, counts and an active pill

Category filter row

Each pill links to a category and shows a post count. All posts is marked active.

Icons, no links

Recipe tags

Plain tags with icons in the brand colour, square corners and a count on the rating pill.

  • Vegetarian
  • Ready in 30 min
  • Family favourite
  • Rated 4.8 (212 items)
  • Quick weeknight
How it works

Three steps to a pill row

Add pills in a repeater and choose how the row behaves.

1

Add the element

Drop Pill Group onto the page, for example above a post grid or under a product title.

2

Add your pills

Give each pill text and, if you like, an icon, a count and a link. Switch on Active for the current one.

3

Choose the overflow

Pick Wrap onto new lines or Scroll sideways for each breakpoint, then set the colours and spacing.

Features

Small element, lots of uses

One repeater covers filters, tags and quick links.

Active pill

Mark the current pill as active. It gets its own colours and aria-current, so screen readers know which one is selected.

Count badges

Add a count to any pill, such as the number of posts or products. It has its own colours inside active pills.

Icons

Add an icon before the text, with its own size, colour and gap.

Links or plain tags

Pills with a link become links with hover and focus styles. Pills without one are plain tags.

Wrap or scroll

Choose per breakpoint whether a long row wraps onto new lines or scrolls sideways on one line.

Alignment

Align the row to the start, centre or end. Responsive, so it can change on phones.

Hover and focus colours

Set hover background, text and border colours, and a focus outline colour for keyboard users.

Size and shape

Set the gap, vertical and horizontal padding, radius, border width and typography.

List markup

Pills are output as a list, and text, counts and links accept dynamic data.

Use cases

Where it works best

Anywhere a short set of labels helps people find or understand something.

01

Blog category filters

Link to each category archive and mark the current one as active.

02

Shop quick links

Point to popular collections with product counts.

03

Recipe and product tags

Show dietary labels, cooking time or features as small tags with icons.

04

Area and location lists

Let visitors jump to a town or area in a long list that scrolls on phones.

05

Event categories

Music, comedy, theatre and family events, each with a count.

06

Skills and topics

List skills on a profile or topics covered on a course page.

Settings reference

Every control, explained

This is the full list of settings in the Breakdance editor, with their default values.

ControlWhat it doesDefault
Content
PillsRepeater. Each pill has Text, Count Badge, Link, Icon and Active.6 sample pills
Layout
OverflowWrap onto new lines or Scroll sideways. Responsive.Wrap, scroll on phone portrait
AlignmentStart, Center or End. Responsive.Start
GapSpace between pills. Responsive.8px
Pill
TypographyText style of the pills.0.875em
Padding (Vertical / Horizontal)Space inside each pill. Responsive.6px / 14px
Radius, Border WidthCorner radius and border width.999px, 1px
Background, Text Color, Border ColorColours of inactive pills.Global colours
Hover Background, Hover Text Color, Hover Border ColorColours when a linked pill is hovered.Brand tint
Focus Outline ColorOutline shown when a pill has keyboard focus.Brand colour
Active Pill
Background, Text Color, Border ColorColours of the active pill.Brand colour
Count Badge
Typography, PaddingText style and padding of the count.—
Background, Text ColorCount colours on inactive pills.—
Active Pill Background, Active Pill Text ColorCount colours inside the active pill.—
Icon
SizeIcon size. Responsive.1em
Gap To TextSpace between the icon, text and count. Responsive.6px
ColorIcon colour.Text colour
Tips & FAQ

Good to know

Does it filter posts on its own?

No. Each pill is a link, so point it at a category archive or a filtered URL. Switch on Active for the pill that matches the current page.

How does the scroll mode work on phones?

With Overflow set to Scroll sideways, the pills stay on one line and the row scrolls horizontally with a swipe. The scrollbar is hidden. The default is wrap on larger screens and scroll on phone portrait.

Can I use pills without links?

Yes. Leave the link empty and the pill is output as a plain tag, with no hover effect.

Is it accessible?

The pills are a list, the active pill has aria-current, icons are hidden from screen readers and linked pills show a focus outline.

Can I show only an icon?

Yes. A pill with an icon and no text still shows. It is output as a plain tag, since a link needs text.

Add Pill Group to your next page

Pill Group is included with Phox Elements, along with 140+ other premium elements for Breakdance.