Sobes.tech
Junior — Senior

Button with compression animation on press

livecode

Task condition

It is necessary to implement a button that visually shrinks in half upon interaction, which is convenient to use in a design system for animated feedback.

struct ShrinkButton: View {
    var label: String
    var onTap: () -> Void

    var body: some View {
        Button(action: onTap) {
            Text(label)
        }
    }
}