Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide transition presets with tree-shaking #7

Open
1 task
hyunbinseo opened this issue Jan 3, 2025 · 0 comments
Open
1 task

Provide transition presets with tree-shaking #7

hyunbinseo opened this issue Jan 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@hyunbinseo
Copy link
Owner

hyunbinseo commented Jan 3, 2025

As of v3.0.0, the fly transition is bundled into the modal component, regardless of being used.

Option 1: Prop-based Dynamic Import

  • Allow transition to be specified via prop
  • Load transition CSS dynamically when component mounts
  • FOUC is not a major concern since modals start hidden

Option 2: Separate Components (Recommended)

  • Create distinct components for each transition variant
  • Better tree-shaking as unused transitions won't be included

Examples

  • horizontal slide-in transition for off-canvas menu (sidebar)
@hyunbinseo hyunbinseo added the enhancement New feature or request label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant