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

Click counter attribute and/or class changes based on clicks #1810

Open
benweidig opened this issue Aug 10, 2024 · 0 comments
Open

Click counter attribute and/or class changes based on clicks #1810

benweidig opened this issue Aug 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@benweidig
Copy link

Is your feature request related to a problem?

I've created a custom HTML graph, as Mermaid.js isn't animatable, and I needed better positional control anyway.

v-click etc. support a lot of possibilities already, but is based around visibility.
Sometimes I want to replace elements, and hidden elements are still occupying space.
I've added a CSS class that removes an element if hidden, so not a real issue.

However, I got some flickering (depending on the browser used) when things got replaced, so I thought maybe I can do some of the animation/replacement myself with CSS, or just updating a particular element instead of replacing it.

Describe the solution you'd like

Adding the current click count to div.slidev-page or div.slidev-layout to allow more fine-grained selection of HTML elements for custom animation/styling/updates.

To support the same semantics as v-click for showing/hiding, a new component could add/remove classes to an element, so styling, etc. could be active for multiple clicks.

Also, a way to wait for clicks before going to the next page would be nice, although it should be possible with an empty element, too.

Describe alternatives you've considered

A mix of v-click, images, and complex CSS selectors to emulate the behavior.

@benweidig benweidig added the enhancement New feature or request label Aug 10, 2024
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