<Masonry> Component

<Masonry> is a container in which the items are laid out one after the other in the inline (or block) direction.

This component is great for creating a gallery.

Here the demo:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Installing <Masonry> Component

There are 2 ways to install <Masonry> component into your react app project:

  • Install the Specific Package of <Masonry> Component
  • Install the Whole Reusable-UI Component Pack, including the <Masonry> Component

Variant Properties

The alternative appearances of the <Masonry> layout without changing the <Masonry>'s functionality.

orientation Property

Sets the orientation of the <Masonry>.

The possible values are:

  • undefined
  • 'inline'
  • 'block'

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

size Property

Defines the alternative size of the <Masonry>.

The possible values are:

  • undefined
  • 'sm'
  • 'md'
  • 'lg'

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

theme Property

Defines the contextual theme of the <Masonry>.

The possible values are:

  • undefined
  • 'primary'
  • 'secondary'
  • 'success'
  • 'info'
  • 'warning'
  • 'danger'
  • 'light'
  • 'dark'

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

gradient Property

Activates a 3D mode of the <Masonry>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

outlined Property

Activates an outlined mode (background-less, contrast foreground, and contrast border) of the <Masonry>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

mild Property

Activates a mild mode (mild background, contrast foreground, and contrast border) of the <Masonry>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

nude Property

Activates an nude mode (background-less, padding-less, and border-less) of the <Masonry>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview
lorem imagelorem imagelorem imagelorem imagelorem imagelorem imagelorem image

Show code

Variables

There are several variables of <Masonry> you can customize. Changing the variables affects all <Masonry> instance and other components that depend on <Masonry>.

Here the exposed variables:

  • Sizes
  • Spacings

The example of accessing, modifying, & adding variables:

Show code