All Projects → significa → React Snuggle

significa / React Snuggle

Licence: mit
An intimate and comfortable way to layout your components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Snuggle

Opensource
♨️ 分享GitHub优秀开源项目和主流开发使用的网站、解决问题方案收集以及学习网站或资料,涵盖了iOS, macOS X, Blockchain, Flutter, Weex, H5, Games, C++, Script等多方面的内容,其中iOS大致包涵以下内容:音视频;IM和直播;逆向开发;图像相关(OpenGL, Metal, GPUImage);内购(IAP), ApplePay和第三方支付;安全攻防和应用加固, 数据安全和算法;常用第三方库;导航栏和状态栏;侧边菜单;数据持久;蓝牙, 手势指纹面容ID解锁, 图片浏览器, 扫码, 下拉和上拉刷新, 指示器, Toast, Menu, Sensor, Privacy, WebView和进度条, 动画, 选择器, 搜索, 分享, 图片验证码, 设备相关信息, 广告, 高仿项目及Demo等。
Stars: ✭ 123 (-51%)
Mutual labels:  masonry
React Messenger
Chat UX components built with React, inspired by Facebook Messenger
Stars: ✭ 167 (-33.47%)
Mutual labels:  css-grid
Griddle
A CSS Grid Framework
Stars: ✭ 215 (-14.34%)
Mutual labels:  css-grid
Minimalist Portfolio
A simple minimalist one page portfolio. Link:
Stars: ✭ 136 (-45.82%)
Mutual labels:  css-grid
Niui
Lightweight, feature-rich, accessible front-end library
Stars: ✭ 152 (-39.44%)
Mutual labels:  masonry
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (+764.54%)
Mutual labels:  masonry
Bootstrap Grid Css
The grid and responsive utilities classes extracted from the Bootstrap 4 framework, compiled into CSS.
Stars: ✭ 119 (-52.59%)
Mutual labels:  css-grid
React Css Grid
React layout component based on CSS Grid Layout and built with styled-components
Stars: ✭ 239 (-4.78%)
Mutual labels:  css-grid
Vue Magic Grid
🧙‍♂️🔌 Responsive Magic Grid for Vue
Stars: ✭ 162 (-35.46%)
Mutual labels:  masonry
Masonic
🧱 High-performance masonry layouts for React
Stars: ✭ 209 (-16.73%)
Mutual labels:  masonry
Box Css Framework
Box - CSS Framework
Stars: ✭ 138 (-45.02%)
Mutual labels:  css-grid
Frow
Flexbox Toolkit & Grid
Stars: ✭ 152 (-39.44%)
Mutual labels:  css-grid
Recal
A minimal, accessible React/Preact calendar component using modern CSS.
Stars: ✭ 191 (-23.9%)
Mutual labels:  css-grid
Dashboards
Responsive dashboard templates 📊✨
Stars: ✭ 10,914 (+4248.21%)
Mutual labels:  css-grid
Canvas Sketch
App to sketch out a business model canvas
Stars: ✭ 232 (-7.57%)
Mutual labels:  css-grid
Savvior
A Salvattore and Masonry alternative without CSS-driven configuration or absolute CSS positioning
Stars: ✭ 122 (-51.39%)
Mutual labels:  masonry
Bedrock
Foundational Layout Primitives for your React App
Stars: ✭ 173 (-31.08%)
Mutual labels:  css-grid
Ragrid
Intrinsic first auto-layout flexbox grid
Stars: ✭ 249 (-0.8%)
Mutual labels:  masonry
Blueprint Css
📘 Blueprint CSS is a modern responsive CSS layout library & grid built on top of CSS Grid and Flexbox.
Stars: ✭ 233 (-7.17%)
Mutual labels:  css-grid
Css Mint
Lightweight and simple to use UI Kit. Fully responsive, just 3KB gzipped.
Stars: ✭ 209 (-16.73%)
Mutual labels:  css-grid

React Snuggle

minzip Lightweight React component to create css-based masonry-like layouts. Snuggle all your components really tight 🛌

Demo

Like a loving couple snuggling in bed, react-snuggle basically tries to make everything very intimate and comfortable by filling every space available (using CSS grid and a bit of javascript).

Features

  • 🤟 Responsive: It works on all size screens;
  • 🤙 Customizable: Easily change how your elements should snuggle;
  • 🤝 Use your favorite library: CSS-in-JS, css modules, plain css, whatever. Feel free to use whatever you want;

Install:

yarn add react-snuggle

Usage:

import Snuggle from 'react-snuggle'

const List = () => (
  <Snuggle>
    <div>Item</div>
    <div>Item</div>
    ...
  </Snuggle>
)

Options

Name Type Default
item React.Element <div />
container React.Element <div />
rowGap Number 20
columnWidth Number 250

Methods

resize Recalculate all spaces available and snuggle each element z its space, it is helpful for lazing loading, resize listeners, and loading images.

Example:

const Component = () => {
  const snuggleRef = useRef()

  const onLoad = () => {
    if (snuggleRef.current) {
      snuggleRef.current.resize()
    }
  }

  return (
    <Snuggle ref={snuggleRef}>
      <img src="example.jpg" onLoad={onLoad} />
    </Snuggle>
  )
}

Todo

  • [ ] Span options (element fill two columns or more);
  • [ ] Filter elements;
  • [ ] Missing tests;
  • [ ] ...

License

MIT

Kudos

@andybarefoot Masonry style layout with CSS Grid


Significa Lda

Significa is an Oporto based digital studio founded in late 2013. Despite being specialised in Interaction Design and Brand Development, we believe that good design thinking can answer almost any question and solve most problems. We aim to provide meaningful design solutions to achieve the best user engagement possible in any situation.

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].