masonry-flow
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

Playground

masonry.oooo.so

Install

npm install masonry-flow

Usage

React

import MasonryFlow from "masonry-flow/react";

<MasonryFlow.Root width="200,300" gap={8}>
  <MasonryFlow.Item style={{ background: "#f00" }} height={150}>
    1
  </MasonryFlow.Item>
  <MasonryFlow.Item style={{ background: "#0f0" }} height={120}>
    2
  </MasonryFlow.Item>
  <MasonryFlow.Item style={{ background: "#00f" }} height={140}>
    3
  </MasonryFlow.Item>
</MasonryFlow.Root>;

Vue

<script setup>
import { MasonryFlowRoot, MasonryFlowItem } from "masonry-flow/vue";
</script>

<template>
  <masonry-flow-root :width="[200, 300]" :gap="8">
    <masonry-flow-item style="background: #f00" :height="150">
      1
    </masonry-flow-item>
    <masonry-flow-item style="background: #0f0" :height="120">
      2
    </masonry-flow-item>
    <masonry-flow-item style="background: #00f" :height="140">
      3
    </masonry-flow-item>
  </masonry-flow-root>
</template>

Package Sidebar

Install

npm i masonry-flow

Weekly Downloads

12

Version

0.2.2

License

MIT

Unpacked Size

27.7 kB

Total Files

19

Last publish

Collaborators

  • catsjuice