# @leveluptuts/motion-elements

> # Motion Elements

Latest version **0.1.3** (published 2022-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @leveluptuts/motion-elements
pnpm add @leveluptuts/motion-elements
yarn add @leveluptuts/motion-elements
bun add @leveluptuts/motion-elements
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2022-04-06 |
| First published | 2020-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Scott Tolinski |
| Maintainers | stolinski |

## Links

- npm: https://www.npmjs.com/package/@leveluptuts/motion-elements
- npm.io page: https://npm.io/package/@leveluptuts/motion-elements

## Recent versions

- 0.1.3 (latest) — 2020-08-12
- 0.1.2 — 2020-07-14
- 0.1.1 — 2020-03-09
- 0.1.0 — 2020-03-09

## README

# @leveluptuts/motion-elements

# Motion Elements

![Mr Wave On ](https://media3.giphy.com/media/JfitEsaTduKME/giphy.gif?cid=790b761122f3c5cd6b97584b994b9277159214ab2fea8be7&rid=giphy.gif)

## Demo

## Install

```bash
yarn add @leveluptuts/motion-elements
```

## Usage

### The Syntax

```jsx
import { Accordion } from '@leveluptuts/motion-elements';

...
<Accordion>
	<p>Another example</p>
</Accordion>
...
```

### More options

```jsx
import React, { useState } from 'react';
import { Accordion } from '@leveluptuts/motion-elements';

const App = () => {
	const [isToggled, setToggle] = useState(true);
	return (
		<div>
			<button onClick={() => setToggle(prev => !prev)}>Toggle</button>
			<Accordion isToggled={isToggled} useButton={false}>
				<p>Some text.</p>
			</Accordion>
		</div>
	)
```

## API

### Accordion

The parent of an array of components

| Prop      | Type       | Default        | Description                                                   |
| --------- | ---------- | -------------- | ------------------------------------------------------------- |
| children  | Components |                | An array of React Components                                  |
| isToggled | Boolean    |                | OPTIONAL \_ The bool that toggles the accordion               |
| useButton | Boolean    | (data) => data | OPTIONAL \_ if you want to bring your own b, byob if you will |

## Contributing

`yarn`
`yarn start`

#### (in another tab) to run example

`cd example`
`yarn`
`yarn start`

## Prior Art and Inspirations

This lib is just basic wrappers around https://www.framer.com/motion/

---
_Source: https://npm.io/package/@leveluptuts/motion-elements · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
