Replies: 1 comment
-
What is the default state of the element before the JS runs? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been encountering an issue with Alpine.js in my project, specifically with toggling the width of an aside element upon page refresh. Here is the relevant code snippet:
:class="{ 'w-64': navIsOpen, 'w-16': !navIsOpen }"
Upon refreshing the page, the aside element initially appears with a width class of w-64 for about 1 second.
After this 1-second period, the width then toggles to w-16 which is the desired width if navIsOpen is false.
Beta Was this translation helpful? Give feedback.
All reactions