alternative-react-components

0.0.3 • Public • Published

<Alternative /> is a React component that wraps two components <SideA />, <SideB /> inside, displays <SideA /> as a normal state, yet displays <SideB /> when you interact with(hover/click on) <Alternative />. This alternative state of <Alternative /> is transformed along with several kinds of animation to choose from.

Usage

<Alternative
  sideA={SideAComponent}
  sideB={SideBComponent}
  clickToTrigger  // default to be false, means hover to alter components
  className={"your-class-name"}  // it is possible to style the outmost <div> of <Alternative /> by giving classnames
/>

TODOS

more animations

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i alternative-react-components

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

23.6 kB

Total Files

7

Last publish

Collaborators

  • xdudu