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

Is it possible to use this plugin with a Javascript framework like Alpinejs or Vue? #36

Closed
raguila8 opened this issue Sep 7, 2021 · 3 comments

Comments

@raguila8
Copy link

raguila8 commented Sep 7, 2021

For example, AlpineJS allows you to add directives for adding different classes at different stages of a transition:
The following examples use TailwindCSS utility classes.

<div x-data="{ open: false }">
    <button @click="open = ! open">Toggle</button>
 
    <div
        x-show="open"
        x-transition:enter="transition ease-out duration-300"
        x-transition:enter-start="opacity-0 transform scale-90"
        x-transition:enter-end="opacity-100 transform scale-100"
        x-transition:leave="transition ease-in duration-300"
        x-transition:leave-start="opacity-100 transform scale-100"
        x-transition:leave-end="opacity-0 transform scale-90"
    >Hello 👋</div>
</div>

The utility classes are added at different stages of the transition. However, when applying the plugin, these class names have been minified and no longer exist in the styles. Is there a way to apply the minification to the class names in these directives as well?

@Scrum
Copy link
Member

Scrum commented Sep 8, 2021

@raguila8 These are great questions, and it will take me some time to explore these possibilities. It will be a little faster if you have ready-made examples that I can investigate.

Scrum added a commit that referenced this issue Sep 9, 2021
@Scrum
Copy link
Member

Scrum commented Sep 9, 2021

@raguila8 Hi, now you just need to add the necessary attributes to participate in the process through the option customAttributes

@Scrum Scrum closed this as completed in 3e71922 Sep 9, 2021
@raguila8
Copy link
Author

raguila8 commented Sep 9, 2021

This is awesome! thanks so much for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants