Next.js Discord

Discord Forum

View transistion api

Unanswered
Sokoke posted this in #help-forum
Open in Discord
Avatar
SokokeOP
Is there anyone with some view transition api knowledge?

I have a page with cards that contain a h2 with text. I want that text to transition. So I made a class main-text and put that on it. My page contains many of these cards, and depending on which one they click they go to a specific page that has one of these. Its not really a option to make a class for each possible card. But seems like the only option since the api doesnt allow duplicate names

Error:
Unexpected duplicate view-transition-name: main-text <h2 class=​"card-title main-text">​V6​</h2>​ <h2 class=​"card-title main-text">​V6​</h2>​ <h2 class=​"card-title main-text">​V6​</h2>​ <h2 class=​"card-title main-text">​V6​</h2>​ <h2 class=​"card-title main-text">​V6​</h2>​ <h2 class=​"card-title main-text">​V6​</h2>​

0 Replies