8000 GitHub - Aeastr/Portal: Seamless element transitions between root, sheets, and navigation pushes in SwiftUI.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Aeastr/Portal

Repository files navigation

Portal Logo

Portal

Portal is a SwiftUI package for seamless element transitions between views—including across sheets and navigation pushes (NavigationStack, .navigationDestination, etc)—using a portal metaphor for maximum flexibility.
Compatible with iOS 15.0 and later

Demo

Example

Real Examples
StickerCaptureDemo.mp4
Amplify.Video.1914493323919650816.mp4

Features

  • DocC Documentation

  • PortalContainer { ... }
    Manages the overlay window logic required for floating portal animations across hierarchies.

  • .portalContainer()
    View extension for easily wrapping any view hierarchy in a PortalContainer.

  • .portalSource(id:)
    Marks a view as the source anchor for a portal transition using a static string identifier.

  • .portalSource(item:)
    Marks a view as the source anchor for a portal transition, keyed by an Identifiable item's ID.

  • .portalDestination(id:)
    Marks a view as the destination anchor for a portal transition using a static string identifier.

  • .portalDestination(item:)
    Marks a view as the destination anchor for a portal transition, keyed by an Identifiable item's ID.

  • .portalTransition(id: isActive: ...)
    Drives the floating overlay animation based on a Binding<Bool> (isActive) and a static string id matching the source/destination.

  • .portalTransition(item: ...)
    Drives the floating overlay animation based on a Binding<Optional<Item>> (item), where Item is Identifiable. Automatically keys the transition to the item's ID

  • No custom presentation modifiers required
    Works directly with standard SwiftUI presentation methods (.sheet, .navigationDestination, etc.).

  • iOS 15+ support

📚 Documentation

For full installation steps, usage guides, examples, and animation deep-dives, visit the Portal Wiki:


License

This project is released under the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Before you begin, take a moment to review the Contributing Guide for details on issue reporting, coding standards, and the PR process.

Support

If you like this project, please consider giving it a ⭐️


Where to find me:


Built with 🍏🌀🚪 by Aether

About

Seamless element transitions between root, sheets, and navigation pushes in SwiftUI.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0