MCPcopy
hub / github.com/beekai-oss/react-simple-animate

github.com/beekai-oss/react-simple-animate @v3.5.3 sqlite

repository ↗ · DeepWiki ↗ · release v3.5.3 ↗
25 symbols 68 edges 39 files 0 documented · 0%
README

React Simple Animate Logo - UI Animation Made Simple

React Simple Animate

React UI animation made easy

npm downloads npm npm Coverage Status

Features

  • Animation from style A to B
  • CSS keyframes animation
  • Chain up animation sequences
  • Tiny size without other dependency

Install

$ npm install react-simple-animate

Docs

Quickstart

Components

import React from "react";
import { Animate, AnimateKeyframes, AnimateGroup } from "react-simple-animate";

export default () => (
  <>
    {/* animate individual element. */}
    <Animate play start={{ opacity: 0 }} end={{ opacity: 1 }}>
      <h1>React simple animate</h1>
    </Animate>

    {/* animate keyframes with individual element. */}
    <AnimateKeyframes
      play
      iterationCount="infinite"
      keyframes={["opacity: 0", "opacity: 1"]}
    >
      <h1>React simple animate with keyframes</h1>
    </AnimateKeyframes>

    {/* animate group of animation in sequences */}
    <AnimateGroup play>
      <Animate start={{ opacity: 0 }} end={{ opacity: 1 }} sequenceIndex={0}>
        first
      </Animate>
      <Animate start={{ opacity: 0 }} end={{ opacity: 1 }} sequenceIndex={1}>
        second
      </Animate>
      <Animate start={{ opacity: 0 }} end={{ opacity: 1 }} sequenceIndex={2}>
        third
      </Animate>
    </AnimateGroup>
  </>
);

Hooks

import react from 'react';
import { useAnimate, useAnimateKeyframes, useAnimateGroup } from 'react-simple-animate';

export const useAnimateExample = () => {
  const { style, play } = useAnimate({ start: { opacity: 0 }, end: { opacity: 1 } });
  useEffect(() => play(true), []);

  return 

useAnimate

;
};

export const useAnimateKeyframesExample = () => {
  const { style, play } = useAnimateKeyframes({ 
    keyframes: ['opacity: 0', 'opacity: 1'], 
    iterationCount: 4 
  });
  useEffect(() => play(true), []);

  return 

useAnimate

;
};

export const useAnimateGroup = () => {
  const { styles = [], play } = useAnimateGroup({
    sequences: [
      { start: { opacity: 1 }, end: { opacity: 0 } },
      { start: { background: "red" }, end: { background: "blue" } }
    ]
  });
  useEffect(() => play(true), []);

  return {styles.map(style => 

useAnimateGroup

)};
};

By the makers of BEEKAI

We also make BEEKAI. Build the next-generation forms with modern technology and best in class user experience and accessibility.

Extension points exported contracts — how you extend this code

Props (Interface)
(no doc)
src/useAnimateGroup.ts
Props (Interface)
(no doc)
src/animateGroup.tsx
AnimationType (Interface)
(no doc)
src/types.ts
IAnimationContext (Interface)
(no doc)
src/animateGroup.tsx
AnimationStateType (Interface)
(no doc)
src/types.ts
AnimationProps (Interface)
(no doc)
src/types.ts
AnimateKeyframesProps (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

getSequenceId
called by 8
src/utils/getSequenceId.ts
createTag
called by 8
src/logic/createTag.ts
createStyle
called by 4
src/logic/createStyle.ts
useAnimateGroup
called by 2
src/useAnimateGroup.ts
useAnimate
called by 1
src/useAnimate.ts
useAnimateKeyframes
called by 1
src/useAnimateKeyframes.ts
createArrayWithNumbers
called by 1
src/utils/createArrayWithNumbers.ts
generateKeyframes
called by 1
src/logic/createStyle.ts

Shape

Function 18
Interface 7

Languages

TypeScript100%

Modules by API surface

src/types.ts4 symbols
src/animateGroup.tsx3 symbols
src/useAnimateKeyframes.test.tsx2 symbols
src/useAnimateGroup.ts2 symbols
src/useAnimateGroup.test.tsx2 symbols
src/useAnimate.test.tsx2 symbols
src/logic/createStyle.ts2 symbols
src/utils/getSequenceId.ts1 symbols
src/utils/createArrayWithNumbers.ts1 symbols
src/useAnimateKeyframes.ts1 symbols
src/useAnimate.ts1 symbols
src/logic/createTag.ts1 symbols

Dependencies from manifests, versioned

@types/enzyme3.10.5 · 1×
@types/enzyme-adapter-react-161.0.6 · 1×
@types/jest26.0.1 · 1×
@types/react16.9.35 · 1×
@types/react-test-renderer16.9.2 · 1×
@typescript-eslint/eslint-plugin3.0.0 · 1×
@typescript-eslint/parser3.0.0 · 1×
coveralls3.0.3 · 1×
enzyme3.11.0 · 1×
enzyme-adapter-react-161.15.2 · 1×
eslint7.0.0 · 1×
eslint-plugin-react7.20.0 · 1×

For agents

$ claude mcp add react-simple-animate \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact