Swift PiecesPro
  • Library
    Screens48Finished, designed screens for real apps.Templates10Complete apps built from the screens.Build Kit24Styles, briefs and recipes for your coding agentEverything58The whole library, with search
  • Docs
  • Pro

Library

  • Screens48
  • Templates10
  • Build Kit24
  • Everything58
  • Docs
  • Pro
  • Account
Get Swift Pieces ProFree library ↗
Swift PiecesPro

Production-ready SwiftUI screens and app templates for iOS. The pieces to build the whole app.

Library

  • Screens
  • Templates
  • Build Kit
  • Everything

Product

  • Pro
  • Your account
  • Sign in

Resources

  • Docs
  • CLI
  • MCP and agents
  • Free library

Social

  • X / Twitter
  • GitHub

SWIFTPIECES PRO

© 2026 Swift Pieces. One payment, lifetime access, per-developer commercial license.

Curated withby Saivion

LibraryScreensSearch

Screen · Productivity

Search

A search screen with recent items and quick actions, and a fuzzy command palette with hold-and-slide to run.

A workspace search screen: recent documents and people as blocks, quick actions, and a native command palette in a sheet with fuzzy search, grouped results plus Recent, one matched-geometry highlight with selection ticks, hold-and-slide to run and drag to dismiss.

SwiftUIiOS 17.0+command-palette

Get Swift Pieces Pro

$199 once, every piece included. See how installing works · Sign in

01

What's included

SwiftUI source you own, built on Apple frameworks only.

  • A search home with recents and quick actions
  • Fuzzy search with grouped results and Recent
  • One matched-geometry highlight with selection ticks
  • Hold and slide to run a command; drag to dismiss

In the Build Kit

Native (style), Productivity (brief). Your agent builds around this screen in the same design.

Used in

Travel App (template)

02

Implementation notes

How it behaves, what it handles, and the decisions behind it.

A workspace search screen: a two-tone title, a search pill, recent documents as blocks, people and quick actions, with CommandPalette in a sheet. The palette opens at the medium detent with the search field focused. Typing filters instantly through a private fuzzy scorer; with an empty query the list shows a Recent section followed by every group in order. One highlight moves between rows with matchedGeometryEffect and ticks on every change. Hold on the list, then slide: the highlight follows the finger without lifting it, and releasing runs the highlighted command. Tap a row or press Go on the keyboard to run it too, and pull the grabber down to dismiss.

Notes

  • PaletteCommand carries title, symbol, group, keywords and a @MainActor @Sendable action, so a command list can be built anywhere.
  • The scorer is a subsequence match: every query character must appear in order in the title or in a keyword. Prefix, word-start and adjacent hits score higher, longer targets score slightly lower, and keyword hits are weighted below title hits. Empty results show ContentUnavailableView.search.
  • Scrub is a LongPressGesture(0.25s) sequenced before a DragGesture; while it runs the scroll view is disabled so the list holds still. Row frames are measured with onGeometryChange in the list's named coordinate space.
  • Running a command inserts its id at the front of recents (capped at eight), dismisses, then calls the action.
  • Rows are VoiceOver buttons with .isSelected on the highlight; group titles carry .isHeader. Reduce Motion shortens the highlight move to a short ease-out.
  • On the screen, the pill and the Search tab both open the palette, and every command writes back: opening a document moves its block to the front of the rail, New doc files one, and a toast takes the tab bar's place to confirm.
  • CommandPaletteExample at the end of CommandPalette.swift is the Search screen from the preview.

03

Keep building

Pieces that work well next to this one.

Screen · Productivity

Focus

A focus session with a dial you drag to set minutes and a ring that drains as you work.

Screen · AI

Ask

An assistant home with a briefing, suggested prompts and a composer that grows, attaches and records.

Screen · Productivity

Dashboard

A home dashboard with a collapsing greeting, live metrics, a scrubbable chart and activity.