Docs
Inputs

Date PillNew

A glass date pill that grows a month out of itself as one piece of liquid glass, the red day flowing to your tap before it drains back.

By

Date Pill: SwiftUI Date Picker Pill for iOS, live preview in light mode

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

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

Colors for DatePill. .standard is the house palette.

Notes

  • Tap the pill and a month grows out of it, born the pill's own size and drawn down into place, joined beneath it by a short neck of liquid glass. Choosing a day closes it, and it drains back into the pill.
  • The chosen day is one red circle that flows from cell to cell on a snap spring. Today's number is red, and days outside range are dimmed and can't be picked.
  • Picking a day keeps the time of day already in selection, so it works for check-ins as well as for dates with a time.
  • The pill's text morphs to the new date only after the panel has drained, so the change lands where you are looking. It reads the weekday, day and month in the person's locale.
  • 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.
  • VoiceOver reads the title and the chosen date, and each day is its own button. Under Reduce Motion the panel opens and closes on a short ease, without bounce.

Usage

DatePillExample()

Install

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

Terminal

$npx swiftpieces add DatePill

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

>Add the SwiftPieces "Date 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