1.6.0 • Published 3 years ago

motion-box v1.6.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

motion-box

A super simple abstraction of Chakra UI's Box component, enhanced with Framer Motion props from the motion API.

Install

This packages requires Chakra UI and its peer dependencies. If you haven't installed Chakra UI in your project, find the necessary pacakges here.

Using npm:

npm install motion-box

Using yarn:

yarn add motion-box

Usage

import MotionBox from 'motion-box';

function Example() {
  return (
    <MotionBox
      height="40px"
      bg="red.300"
      drag="x"
      dragConstraints={{ left: -100, right: 100 }}
      whileHover={{ scale: 1.1 }}
      whileTap={{ scale: 0.9 }}
    />
  );
}

Demo

See a working demo using motion-box here

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.2.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.1

3 years ago