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

[DRAFT] feat: configurable <MotionGroup> child element variants using :config-fn prop #193

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

BobbieGoede
Copy link
Member

๐Ÿ”— Linked issue

โ“ Type of change

  • ๐Ÿ“– Documentation (updates to the documentation, readme or JSDoc annotations)
  • ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • โœจ New feature (a non-breaking change that adds functionality)
  • ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

This is built on #192.

This draft can be considered a feature proposal, its usefulness can be previewed in the updated docs with the following example of how easy a staggered animation would look like:

<MotionGroup preset="slideVisibleLeft" :config-fn="(index) => ({ delay: index * 200 })">
  <section>
    <h3>Product 1</h3>
    <p>Description text</p>
  </section>
  <section>
    <h3>Product 2</h3>
    <p>Description text</p>
  </section>
  <section>
    <h3>Product 3</h3>
    <p>Description text</p>
  </section>
</MotionGroup>

Not sure about the name of the prop, still need to add tests as well, feedback is appreciated!

๐Ÿ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

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

Successfully merging this pull request may close these issues.

1 participant