question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collapse - Horizontal animation

See original GitHub issue

As 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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kyletsangcommented, Aug 21, 2021

@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#L248

ie.

computedDimension === 'width' && 'collapse-horizontal',
0reactions
nsi319commented, Aug 21, 2021

Hi @kyletsang. When the dimension prop === height, the existing Collapse component is sufficient. When the value is width, we need to make the updates. Could you guide me on how to introduce horizontal animations to it?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found