Collapse - Horizontal animation
See original GitHub issueAs of v5.1 Bootstrap now supports horizontal collapse animations with the .collapse-horizontal
class https://getbootstrap.com/docs/5.1/components/collapse/#horizontal
I’m guessing the Collapse component will need to be updated to use this when the dimension
prop === width
? (<Collapse dimension="width"></Collapse>
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Bootstrap 4 horizontal collapse animation on ...
Collapse width with Bootstrap 4. How to change the collapse transition to horizontal in Bootstrap 4 so that transition is left to right....
Read more >Collapse
Collapsing an element will animate the height from its current value to 0 . Given how CSS handles animations, you cannot use padding...
Read more >Bootstrap Collapse - examples & tutorial
Collapsing an element will animate the height from its current value to 0 . Given how CSS handles animations, you cannot use padding...
Read more >How to smooth horizontal collapse transition with React- ...
Collapsing still jumped without any transition animation. – userNick. Mar 1, 2020 at 0:59. But the content ...
Read more >Building performant expand & collapse animations
An alternative to animating width and height might be to use the (now-deprecated) clip property to animate the expand and collapse effect. Or, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nsi319
We can replace the
.width
class that’s added here with.collapse-horizontal
: https://github.com/react-bootstrap/react-bootstrap/blob/74894de1b50e005280d0270719a4a36e2bf4026c/src/Collapse.tsx#L248ie.
Hi @kyletsang. When the
dimension
prop ===height
, the existing Collapse component is sufficient. When the value iswidth
, we need to make the updates. Could you guide me on how to introduce horizontal animations to it?