WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Feature Request: Allow custom transition animation for popups #199

@videni

Description

@videni

Problem

Currently, vertical popups (TopPopup/BottomPopup) use a fixed .move(edge:) transition animation. There's no way to customize the transition to use different animations like .opacity, .scale, or combined transitions.

Use Case

In some UI designs, a fade-in/fade-out transition looks better than the default slide animation. For example:

  • Tooltip-style popups that should appear/disappear smoothly
  • Alert popups that benefit from a scale + opacity animation
  • Custom popups that need to match the app's animation style

Proposed Solution

Add a .transition(_ value: AnyTransition) configuration method to LocalConfigVertical (which includes BottomPopupConfig and TopPopupConfig).

Example Usage

func configurePopup(config: BottomPopupConfig) -> BottomPopupConfig {
    config
        .transition(.opacity)  // Fade in/out instead of slide
}

// Or combined transitions
config.transition(.scale.combined(with: .opacity))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions