You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-motion-grid

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-motion-grid

ReactMotion Grid

1.2.3
latest
Source
npmnpm
Version published
Weekly downloads
1
-94.12%
Maintainers
1
Weekly downloads
 
Created
Source

react-motion-grid

Installing

$ npm install react-motion-grid --save

Demos

Usage

<MotionGrid
  columns={[
    6, 6
    4, 4, 4
    3, 3, 3, 3
    6, 6,
  ]}
  innerPadding={{
    vertical: 10,
    horizontal: 10,
  }}
>
  {range(20).map(renderItem)}
</MotionGrid>
PropertyTypeDefaultDescription
children*arrayOf (element)Array of react elements you want to render in a grid.
columnsunion (
number,
arrayOf (number)
)
12This controls number of columns to render for each row.

This MUST be between 1 and 12

e.g. 12 / 3 -> This will render 3 columns in each row.

e.g. [ 6, 6, 4, 4, 4 ] -> This will render 5 items in two rows, first

row will render two items (6, 6), second row will render three items

(4, 4, 4).
innerPaddingunion (
number,
string,
shape {
vertical: union
horizontal: union
}
)
0Inner paddings between items. You can have different vertical and horizontal

paddings.
startAnimatebooltrueIf you want to control when the animation should start then set this to

false.
animationTypeenum ('bottomFadeIn', 'fadeIn')'fadeIn'Animation type to use.
disableAnimationboolThis will disable the animation.
enablePagingboolfalseEnable paging feature.
pagingOptionsshape {
isFetchedAll: bool
isLoading: bool
loadMoreItems: func
}
{}This is only considered when enablePaging is true.
springOptionsshape {
stiffness: number
damping: number
}
presets.noWobbleReact motion configurations.

More about this here
enablePlaceholdersboolfalseWhether or not to enable placeholders.
placeholderRowsnumber3Number of placeholder rows to show before data is loaded
placeholderItemelementReact element to render for the placeholder
minimumPlaceholdersTimenumber0Minimum millis to wait before hiding placeholder even if the data was loaded.

This is used to pervent flickers when the data is loaded in a very short time

Contributing

To contribute, follow these steps:

  • Fork this repo.
  • Clone your fork.
  • Run npm install
  • Run npm start
  • Goto localhost:3000
  • Add your patch then push to your fork and submit a pull request

License

MIT

Keywords

react-motion-grid

FAQs

Package last updated on 18 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts