Morphing Controls

Morphing Controls

A floating + button that morphs into an action menu with staggered blur-in rows, and a header search icon that stretches into a full-width search field. A mobile-native alternative to hamburger menus.

Luiz Mello
  • menu
  • search
  • transition

snippet.swift292 lines

6 files • Scroll to see all →
public struct MorphMenuItem: Identifiable {    public let id = UUID()    let title: String    let subtitle: String?    let systemImage: String    let tint: Color    let action: () -> Void​    public init(_ title: String, subtitle: String? = nil, systemImage: String, tint: Color = .blue, action: @escaping () -> Void = {}) {        self.title = title        self.subtitle = subtitle        self.systemImage = systemImage        self.tint = tint        self.action = action    }}
Viewing: MenuItem.swift•1 of 6