All Projects → Tsuk1ko → vue-flex-waterfall

Tsuk1ko / vue-flex-waterfall

Licence: MIT license
🌊 A horizontal sorting waterfall layout component for Vue.js, realized by flex layout

Programming Languages

Vue
7211 projects
HTML
75241 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-flex-waterfall

flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (+0%)
Mutual labels:  flex
flex-bison-indentation
An example of how to correctly parse python-like indentation-scoped files using flex (and bison).
Stars: ✭ 32 (+18.52%)
Mutual labels:  flex
icon-generator
Generate icons and launch screens for your Adobe AIR projects.
Stars: ✭ 24 (-11.11%)
Mutual labels:  flex
spellbook
Functional library for Javascript
Stars: ✭ 14 (-48.15%)
Mutual labels:  waterfall
sass-flexbox
Manage Flexbox in Sass easily.
Stars: ✭ 40 (+48.15%)
Mutual labels:  flex
ETCollectionViewWaterFallLayout
ETCollectionViewWaterFallLayout is a subclass of UICollectionViewLayout written completely in Swift!
Stars: ✭ 29 (+7.41%)
Mutual labels:  waterfall
SwiftWaterfallFlow
swift写的瀑布流布局
Stars: ✭ 37 (+37.04%)
Mutual labels:  waterfall
Anthem
React waterfall
Stars: ✭ 61 (+125.93%)
Mutual labels:  waterfall
language-grammars
Syntax highlighting for ABNF/BNF/EBNF, Yacc, and other language-related languages.
Stars: ✭ 14 (-48.15%)
Mutual labels:  flex
bit-css
用原子类赋予元素属性,减少甚至不写css
Stars: ✭ 19 (-29.63%)
Mutual labels:  flex
material2-admin
Angular - Material2 - Redux - Flex - Admin Example - Starter
Stars: ✭ 13 (-51.85%)
Mutual labels:  flex
Flex-AntiCheat
Flex AntiCheat - Optimized Configs For Multiple AntiCheats
Stars: ✭ 37 (+37.04%)
Mutual labels:  flex
flexui
A light UI for C++ with XML and CSS support
Stars: ✭ 21 (-22.22%)
Mutual labels:  flex
Decaf-Compiler
Compiler for Decaf Programming Language
Stars: ✭ 36 (+33.33%)
Mutual labels:  flex
CollectionViewMultiColumnLayout
A tiled waterfal/mosaic UICollectionViewLayout with support for explicit columns.
Stars: ✭ 13 (-51.85%)
Mutual labels:  waterfall
Virtual Controllers
Virtual controls for use in Flash based games on touch devices. Includes thumbstick and button ui elements
Stars: ✭ 16 (-40.74%)
Mutual labels:  flex
react-styled-flexbox
A Flexbox React component harnessing the power of styled-components
Stars: ✭ 30 (+11.11%)
Mutual labels:  flex
vue-layout-system
A pack of Vue components that solve daily layout problems
Stars: ✭ 31 (+14.81%)
Mutual labels:  flex
NatLang
NatLang is an English parser with an extensible grammar
Stars: ✭ 20 (-25.93%)
Mutual labels:  flex
simpPRU
Intuitive language for PRU which compiles down to PRU C
Stars: ✭ 54 (+100%)
Mutual labels:  flex

vue-flex-waterfall

Version License

中文文档

A horizontal sorting waterfall layout component for Vue 3, realized by flex layout.

Refer to CSS masonry with flexbox, :nth-child(), and order.

Version 2 requires Vue 3. If you are looking for a Vue 2 compatible version, use version 1.

Demo

Vue Flex Waterfall Demo

Source code of demo

Requirements

Vue ^3.0.0

Installation

npm i vue-flex-waterfall

Usage

Vue project

<VueFlexWaterfall
  col="4"
  col-spacing="15"
  :break-at="{ 900: 3, 600: 2, 300: 1 }"
>
  <!-- items -->
</VueFlexWaterfall>
import VueFlexWaterfall from 'vue-flex-waterfall';

export default {
  // ...
  components: {
    VueFlexWaterfall,
    // ...
  },
  // ...
}

Browser

<script src="https://unpkg.com/vue-flex-waterfall@2/dist/vue-flex-waterfall.umd.js"></script>

Props

height

Type: Number | String

Default: undefined

You can specify the height of the container. If not, height will be calculated automatically.

The unit is px when it is a number.

align-content

Type: String

Default: 'start'

Equal to align-content CSS value of the container.

MDN document

col

Type: Number | String

Default: 1

Default number of column. Use the break-at prop to specify breakpoints for this value.

col-spacing

Type: Number | String

Default: 0

Column spacing. The unit is px when it is a number.

break-at

Type: Object

Default: {}

This object allows you to specify how the number of columns will change based on the width of the viewport.

Setting this option to { 900: 3 } for example will adjust the number of columns to 3 when the viewport change and is <= 900px.

break-by-container

Type: Boolean

Default: false

When enable, the breakpoints will be based on the container width instead of the window width.

Events

order-updated

Will be emitted after order of slot elements are updated.

Methods

updateOrder

You can call this method to trigger order updating.

How to call component method: see Vue Guide - ref

Tips

  1. You can set margin-bottom style for slot elements to control their vertical spacing.
  2. You can set align-content style for vue-flex-waterfall component to control column alignment.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].