https://github.com/Vestride/react-stacked-elements
Toggle the visibility of two elements without removing them from the document layout
https://github.com/Vestride/react-stacked-elements
layout positioning react stack
Last synced: over 1 year ago
JSON representation
Toggle the visibility of two elements without removing them from the document layout
- Host: GitHub
- URL: https://github.com/Vestride/react-stacked-elements
- Owner: glen-cheney
- License: mit
- Created: 2020-07-29T04:05:04.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T08:41:19.000Z (over 3 years ago)
- Last Synced: 2024-12-19T11:08:37.635Z (over 1 year ago)
- Topics: layout, positioning, react, stack
- Language: TypeScript
- Homepage: https://vestride.github.io/react-stacked-elements
- Size: 2.78 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-stacked-elements ![Build Status][actions-img]
> 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
```shell
npm install react-stacked-elements
```
## Usage
```tsx
Absolutely
No
```
## Demos
Check them out here
[actions-img]: https://github.com/Vestride/react-stacked-elements/actions/workflows/build.yml/badge.svg?branch=main