1.0.1 • Published 4 years ago
react-stacked-elements v1.0.1
react-stacked-elements 
Toggle the visibility of elements without causing a layout shift
This package uses CSS Grid to place items at the same column and row, then toggles their visibility based on the selectedIndex property.
Install
npm install react-stacked-elementsUsage
<StackedElements selectedIndex={isChecked ? 0 : 1}>
<span>Absolutely</span>
<span>No</span>
</StackedElements>Demos
Check them out here https://vestride.github.io/react-stacked-elements/