0.0.2 • Published 2 years ago

flow-layout-wc v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Flow Layout WC

The flow-layout-wc is a high performance flow layout component written using web-component

It can support running in various frameworks, such as React Vue

image

🌈 Demo

⚙️ Installation

  • npm

npm i flow-layout-wc
  • scripts

<script src="https://cdn.jsdelivr.net/npm/flow-layout-wc/dist/index.iife.js"></script>

🦄 Example

🐔 Use in VanillaJS

import 'flow-layout-wc'
<flow-layout gap="10" cols="3">
  <div>01</div>
  <div>02</div>
  <div>03</div>
  <div>04</div>
  <div>05</div>
  <div>06</div>
</flow-layout>

🐔 Use in React

📄 App.tsx

import 'flow-layout-wc'

export default function MyApp() {
  return (
    <flow-layout gap={10} cols={3}>
      <div>01</div>
      <div>02</div>
      <div>03</div>
      <div>04</div>
      <div>05</div>
      <div>06</div>
    </flow-layout>
  )
}

🐔 Use in Vue

📄 main.ts

import 'flow-layout-wc'

📄 App.vue

<template>
  <flow-layout :gap="10" :cols="3">
    <div>01</div>
    <div>02</div>
    <div>03</div>
    <div>04</div>
    <div>05</div>
    <div>06</div>
  </flow-layout>
</template>

📄 Props

NameTypeDefaultDescription
colsnumber2Number of columns
gapnumber4Interval between cells

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

👏 Contributing

If you have any questions or requests or want to contribute, please write the issue or give me a Pull Request freely.

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago