svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.27k stars 63 forks source link

[Improvement] modal transition #430

Closed twoco closed 1 year ago

twoco commented 1 year ago

It would be great if we could define custom transition for e.g. modals. In best case with global configuration. But let me explain why I created this issue:

The current transition looks a bit rough. Because the scale from 0 to 1. I would start from 0.5 or 0.9.

You could also just set the start option for the scale. With the change I would not really need a custom transition.

Here is my suggestion. You can play with the values if you like. Maybe this is matter of taste. Just try it out.

<div 
  class={classes.transition} 
  transition:scale={{ duration: 200, easing: cubicOut, start: 0.9 }}
>
  ...
</div>

docs | source

BeeMargarida commented 1 year ago

I think this can be improved by adding a prop for the transition options, so that there's more control about it.