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

LibraryScreensStay

Screen · Travel

Stay

A stay detail screen over full-bleed scenery, with a floating booking card that rises and flicks away.

A booking screen for a place to stay: dusk scenery, a two-line serif name, the house as fact blocks and a floating booking card that rises with a spring, leans with your drag and flicks away. Its two detents are each laid out to fit: dates and the request at rest, then guests, the week and the price. The card ships as `.glassSheet` for your own screens.

SwiftUIiOS 17.0+glass-sheet

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 stay detail screen with scenery, amenities and price
  • A floating booking card that leans with your drag and flicks away
  • Two detents, each laid out to fit, with the action pinned to the bottom
  • An optional selection binding for the detent
  • .glassSheet(isPresented:content:) for your own screens

In the Build Kit

Travel (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.

Apply .glassSheet(isPresented:content:) to any view. The card is inset from the edges rather than attached to the bottom, so it reads as a floating panel: it rises with a spring, carries a grabber, and dims the content behind it. Drag anywhere on the card to move it; the card also leans slightly with horizontal movement and rubber-bands when pushed up. Flick down and it leaves along the drag vector; with two detents, a flick up grows it to the tall size. It rides above the keyboard. .glassEffect on iOS 26, Material below.

Notes

  • States: hidden, presented, dragging, tall detent (when two detents are given). The dim thins as the card is pulled toward dismissal, so the scrim tracks the gesture rather than switching at the end.
  • Release decisions use predictedEndTranslation: past 45% of the card height dismisses with a rigid haptic, an upward flick past 80pt grows to the second detent, a downward flick from the tall detent returns to the resting one, and everything else settles with a soft haptic.
  • Horizontal drag is damped to 35% and rubber-banded to 40pt; upward drag rubber-bands to 48pt. Both use the same limit * (1 - 1 / (1 + d / limit)) curve as the rest of the Pro sheets.
  • The card is a modal accessibility container with an escape action. The grabber is an adjustable element when two detents exist (swipe to resize), otherwise a button that closes the card.
  • Reduce Motion replaces the springs with short ease-outs; Reduce Transparency swaps glass and Material for an opaque system background.
  • Pass selection: (optional, additive) to read or set the detent index. The content gets the card's full height, so a Spacer can pin an action to the bottom edge at every detent.
  • The Stay screen reads \.spTheme: dusk scenery mixed from the brand's blocks, a two-line serif name, the house as three fact blocks and a floating booking bar whose Reserve action raises the card.
  • The card shows different content per detent through selection: the resting detent holds the dates as two blocks and the request action; the tall one adds guests, the week of the stay and the price, with the action still on the bottom edge. ViewThatFits falls back to a scroll view when Dynamic Type makes the content taller than the card, so nothing is clipped.
  • GlassSheetExample at the end of GlassSheet.swift is the Stay screen from the preview.

03

Keep building

Pieces that work well next to this one.

Screen · Travel

Nearby

A map of places nearby with a Maps-style sheet that scrolls, snaps and hands off to its list.

Screen · Travel

Discover

A travel discover feed of story cards that expand into full-screen guides and pull back.

Screen · Media

Gallery

A trip album that pages with depth, captions on color blocks, and a pinch to peek at the centred photo.