N
N
nluparev2018-06-29 11:15:12
React
nluparev, 2018-06-29 11:15:12

What lib or approach to use to implement collapse/expand animation in React.js?

5b35e9f8af5e0179608383.png
the next element will collapse (decrease in height) and expand (increase in height) along the wedge on the icon in the upper right corner.
I need advice on how to do this in React.js. what library to use for this or maybe you can get by with a simpler solution

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2018-06-29
@nluparev

Simple solution, use animation on classes:
set transition, then change css class on click. Specify the height in the class. Due to the fact that there is a transition - the height will change smoothly.
ps still can help - documentation

A
anlamas, 2018-06-29
@anlamas

Javascript called easy solution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question