2.0.4 • Published 7 months ago

react-magic-card v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Release Status Minzip Size License: MIT

This is the framer motion animation components, that support images gallery.

Installation

npm install react-magic-card framer-motion

Usage Guide

import { StraightInfinity } from 'react-magic-card'

function MyComponent() {
  const images = [
    {
      src: '/cat.jpeg',
      alt: 'alt'
    },
    {
      src: '/dog.jpeg',
      alt: 'alt'
    },
    {
      src: '/bird.jpeg',
      alt: 'alt'
    }
  ]

  return (
    <StraightInfinity
      images={images}
      width={100}
      height={100}
      controller={100}
      start={Math.ceil(images.length / 2 - 1)}
    />
  )
}

Common Properties

PropertyMeaning
images (required)array of images and objects containing the src and alt properties
start (required)index number of the array of start scale position
width (required)width of the single image
height (required)height of the single image
controller (required)controller size is add to the size of the component
offsetIndexadd an offset to the index of the components and images
reverseIndexorder the change the overlap of zindex default true
classNameclassName of the component
classImagesclassName of the images
classImageSelectclassName of the select image
classImageUniqueclassName of the index number is assigned to the end
animateobject in the animation property
initialobject in the animation property
transitionobject in the transition property
detailTransitionobject in the transition property
detailPropertyobject in the detail property
loadingloading attribute of img element in html
initialFadeRangerange of fade animation after page loaded
initialTransTimetransition time of fade animation after page loaded

CircleRotation Properties

PropertyMeaning
radius (required)radius of the circle

StraightInfinity Properties

PropertyMeaning
verticalvertical or horizontal the default true
marginspacing of the between images

Animation Object

PropertyMeaning
scalescaling of the images
opacityopacity or transparency of the images
rotaterotation of the images
rotateXX-axis rotation of the images
rotateYY-axis rotation of the images
rotateZZ-axis rotation of the images
selectScalescaling of the selected image
selectOpacityopacity of the selected image
selectRotaterotation of the selected image
selectRotateXX-axis rotation of the selected image
selectRotateYY-axis rotation of the selected image
selectRotateZZ-axis rotation of the selected image

Transition Object

It is Inherits framer motion transition object ease and (type: 'spring').

detailProperty Object

PropertyMeaning
classDetailclassName of the detail image
whitewhite or black for background the default true
alphabackground transparency of a number between 0 ~ 1
blurblur intensity of a number between 1 ~ 20 a preferred
scalescale of the detail image
rotaterotation of the images

License

The MIT License.

2.0.3

7 months ago

2.0.2

7 months ago

2.0.4

7 months ago

2.0.1

7 months ago

2.0.0

7 months ago

1.1.1

8 months ago

1.1.2

8 months ago

1.1.0

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.24

10 months ago

0.1.23

10 months ago

0.1.22

10 months ago

0.1.21

10 months ago

0.1.20

10 months ago

0.1.19

10 months ago

0.1.18

10 months ago

0.1.17

10 months ago

0.1.16

10 months ago

0.1.15

10 months ago

0.1.14

10 months ago

0.1.13

10 months ago

0.1.12

10 months ago

0.1.11

10 months ago

0.1.10

10 months ago

0.1.9

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago