Docs
Inputs

Time Slot PickerNew

Bookable times as glass pills in a grid: the red selection flows across and down to the time you tap, and taken times shake.

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

Colors and metrics for TimeSlotPicker. .standard is the house palette: the brand red on neutral glass.

Notes

  • Build slots from your availability. Each Slot is a start time and whether it is open; times are formatted in the user's locale and 12 or 24 hour clock.
  • Open times sit on liquid glass pills in a grid of columns (three by default, two at accessibility text sizes). The red selection flows to the time you tap, along a row or across rows: the edges facing the new slot lead on a tight spring and the far edges follow on a looser one, so it stretches toward the pick and gathers in. The label under it turns to ink.
  • The first pick grows the selection in place on its slot. Slot frames are measured, so it lines up at any text size.
  • Taken times are outlined and struck through. Tapping one shakes it with a firm haptic instead of selecting it, and VoiceOver reads it as Unavailable.
  • One selection haptic fires per pick. Setting selection to nil from outside fades the selection away. .disabled(true) dims the grid.
  • Under Reduce Motion the selection slides whole on one short spring and grows in with a fade. Reduce Transparency draws the pills as solid shapes.
  • Pairs with Date Strip above it for a booking step.

Usage

TimeSlotPickerExample()

Install

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

Terminal

$npx swiftpieces add TimeSlotPicker

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

>Add the SwiftPieces "Time Slot Picker" 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.

54 screens · 46 patterns · 48 flows · 12 templates · 31 Build Kit skills

Explore Pro