
Magnetic Dock
A glassy, finger-driven dock: icons swell on a smooth falloff as you slide, the dock stretches around your touch, a label bubble morphs between app names with haptic ticks, and lifting your finger launches the app with a classic bounce and running dot.
- navigation
- interaction
- gesture
snippet.swift451 lines
9 files • Scroll to see all →
/// A single app in a `MagneticDock`.public struct MagneticDockItem: Identifiable { public let id: String public var title: String public var systemImage: String public var colors: [Color] public var badge: Int? public init(_ title: String, systemImage: String, colors: [Color], badge: Int? = nil, id: String? = nil) { self.id = id ?? title self.title = title self.systemImage = systemImage self.colors = colors.isEmpty ? [.accentColor] : colors self.badge = badge }}Viewing: DockItem.swift•1 of 9