Reaction Picker

Reaction Picker

Long-press a chat bubble to pop a reaction bar over a blurred backdrop, then slide across it: the reaction under your finger magnifies with a selection haptic. Release and it flies onto the message as a badge.

Luiz Mello
  • interaction
  • gesture
  • overlay

snippet.swift419 lines

8 files • Scroll to see all →
/// A tapback-style reaction drawn with an SF Symbol.public struct ReactionPickerReaction: Identifiable, Hashable {    public var id: String { label }    let label: String    let systemImage: String    let tint: Color​    public init(label: String, systemImage: String, tint: Color) {        self.label = label        self.systemImage = systemImage        self.tint = tint    }​    public static let samples: [ReactionPickerReaction] = [        .init(label: "Love", systemImage: "heart.fill", tint: .pink),        .init(label: "Like", systemImage: "hand.thumbsup.fill", tint: .blue),        .init(label: "Dislike", systemImage: "hand.thumbsdown.fill", tint: .gray),        .init(label: "Haha", systemImage: "face.smiling", tint: .orange),        .init(label: "Wow", systemImage: "exclamationmark.2", tint: .red),        .init(label: "Question", systemImage: "questionmark", tint: .purple),​// ... (click "Show full code" to see more)
Viewing: Model.swift•1 of 8