Docs
Inputs

Guests PillNew

A glass guests pill that grows steppers for adults, children and pets out of itself, then drains back reading the party in words.

By

Guests Pill: SwiftUI Guest Count Picker for iOS, live preview in light mode

Guests Pill, a SwiftUI Guest Count Picker for iOS 17+, in its live preview. Open Code for the Swift source.

$npx swiftpieces add GuestsPill
Free · MIT + Commons ClauseiOS 17.0+Liquid Glassguestssteppercounterpillglassformbooking
Type
GuestsPill
Files
GuestsPill.swift
Depends on
Nothing (Apple frameworks only)
Version
1.0.0

Colors for GuestsPill. .standard is the house palette.

Notes

  • Tap the pill and a panel of steppers grows out of it, joined beneath it by a short neck of liquid glass: adults, children and, when you pass pets, pets.
  • Each tap flashes its button red, rolls the count and plays a soft haptic. A count at its limit dims its button. Adults and children together never pass maximum, and there is always at least one adult.
  • The pill reads the party in words, "3 guests, 1 pet" by default, and resizes to fit once the panel has drained back. Pass summary for your own wording.
  • The panel opens over the content below, centred under the pill. Give the pill a higher zIndex than the views after it.
  • On iOS 26 the pill and panel are Liquid Glass; before that they are frosted. Under Reduce Transparency they are solid.
  • Each row is one adjustable element for VoiceOver: swipe up or down to change it. Under Reduce Motion the panel opens and closes on a short ease, without bounce.

Usage

GuestsPillExample()

Install

Pick one. Run it from the folder that contains your .xcodeproj and the files land inside your app.

Terminal

$npx swiftpieces add GuestsPill

Or ask your coding agent · Claude Code, Cursor or Xcode, once the MCP server is connected

>Add the SwiftPieces "Guests Pill" piece to my app

Or copy the source above into your app.

New to SwiftUI?If you know React, CSS or Tailwind, SwiftUI is easier to pick up than it looks.Try real app patterns first

Building a whole app? See SwiftPieces Pro →

All inputs and forms →

Build it yourself: SwiftUI haptics guide

On this page

SwiftPiecesPro

Build the whole app with one library.

Production-ready screens, whole flows, complete app templates, a Build Kit your agent follows and Pro remixing.

Explore Pro