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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Simplify directives for animations #6

Closed
StevenJPx2 opened this issue Apr 25, 2024 · 1 comment
Closed

馃殌 Simplify directives for animations #6

StevenJPx2 opened this issue Apr 25, 2024 · 1 comment
Assignees
Labels
馃殌 enhancement New feature or request

Comments

@StevenJPx2
Copy link
Owner

Description

Currently this is how you would want to create a baked text-split animation to translate lines from the bottom:

<h1
  v-split-animate="{
    baked: true,
    options: {
      splitBy: 'lines',
      animationOptions: { translate: true },
    },
  }"
>
  Nuxt is so cool
</h1>

This is a lot to do just one thing. Code often gets longer and verbose.

Solution

Apply the settings to the directive name itself, for example:

<h1 v-text-animate-baked-lines="{ translate: true, opacity: 'out' }">
  Nuxt is so cool
</h1>

Furthermore, we can have multiple entry types for values:

<h1 v-text-animate-baked-lines="['translate', { opacity: 'out' }]">
  Nuxt is so cool
</h1>

Implementation details

@StevenJPx2 StevenJPx2 added the 馃殌 enhancement New feature or request label Apr 25, 2024
@StevenJPx2 StevenJPx2 self-assigned this Apr 25, 2024
@StevenJPx2
Copy link
Owner Author

Closed with v1.0.0-beta.0.

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