Skip to content
Inline Slot preview
Rendered from the SwiftUI source on this page.

Inline Slot

From syxUI — written for both platforms, not translated between them.

A compact date-time slot.

Inputs · SwiftUI · iOS 17

  • inputs
  • swiftui

The actual source

PickerInlineCompact.swift
// Inline Slot · syxUI · https://syxui.dev/components/picker-inline
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let pkBlue = Color(red: 0.0, green: 0.47, blue: 1.0)

struct PickerInlineCompact: View { var body: some View { HStack(spacing: 14) { VStack(spacing: 2) { Text("JUL").font(.system(size: 11, weight: .bold)).foregroundStyle(pkBlue); Text("24").font(.system(size: 24, weight: .bold)); Text("Fri").font(.system(size: 11)).foregroundStyle(.secondary) }.frame(width: 60); Divider().frame(height: 44); VStack(alignment: .leading, spacing: 2) { Text("2:30 PM – 3:30 PM").font(.system(size: 15, weight: .medium)); Text("1 hour · Video call").font(.system(size: 12)).foregroundStyle(.secondary) }; Spacer() }.padding(14).frame(width: 300).background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 14, style: .continuous)).overlay(RoundedRectangle(cornerRadius: 14, style: .continuous).stroke(Color.primary.opacity(0.08))) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17