eiriklv / react-masonry-component

A React.js component for using @desandro's Masonry
MIT License
1.43k stars 145 forks source link

What are the masonry options properties? #160

Open Code4Zelda opened 2 years ago

Code4Zelda commented 2 years ago

i notice in the docs it just shows transition options in the option object?

const masonryOptions = { transitionDuration: 0 };

Do you guys have more options or does any thing can go inside of it.

afram commented 2 years ago

Hi @Code4Zelda those options should be the same as the options you'd pass into Masonry. https://masonry.desandro.com/options.html

doichev-kostia commented 2 years ago

`export interface MasonryOptions { columnWidth?: number | string | HTMLElement | null; itemSelector?: string; gutter?: number | string; percentPosition?: boolean; horizontalOrder?: boolean; stamp?: string; fitWidth?: boolean; originLeft?: boolean; originTop?: boolean; containerStyle?: Object; transitionDuration?: number | string; resize?: boolean; initLayout?: boolean; }

export interface MasonryPropTypes { enableResizableChildren?: boolean; disableImagesLoaded?: boolean; updateOnEachImageLoad?: boolean; onImagesLoaded?: (instance: any) => void; options?: MasonryOptions; className?: string; elementType?: string; style?: Object; onLayoutComplete?: (instance: any) => void; onRemoveComplete?: (instance: any) => void; } `