emilkowalski / vaul

A drawer component for React.
https://vaul.emilkowal.ski
MIT License
6.45k stars 215 forks source link

Feature Request: Initially open drawer without animation #481

Closed tschmidt01 closed 1 month ago

tschmidt01 commented 1 month ago

For cases where you want to use the drawer in combination with outlets and routing, it would be awesome if you could pass in a default open state which will just render the drawer in the open state without animating so that then refreshing the browser on routes where the outlet content is rendered into the drawer the animation won't happen.

alishahlakhani commented 1 month ago

100%. Even I'm trying to achieve something like this but its not working as of now, forcing me to use the component as client side

alishahlakhani commented 1 month ago

@tschmidt01 This is a good workaround for now

emilkowalski commented 1 month ago

Added in #488. I've disabled initial animation when defaultOpen is true.