react-stacked-elements
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

react-stacked-elements Build Status

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

Usage

<StackedElements selectedIndex={isChecked ? 0 : 1}>
  <span>Absolutely</span>
  <span>No</span>
</StackedElements>

Demos

Check them out here https://vestride.github.io/react-stacked-elements/

Package Sidebar

Install

npm i react-stacked-elements

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

15.4 kB

Total Files

12

Last publish

Collaborators

  • vestride