Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alexeyraspopov/stack-layout

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alexeyraspopov/stack-layout

Layout primitive that abstracts flexbox in order to define the layout for children components.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by22.22%
Maintainers
1
Weekly downloads
 
Created
Source

stack-layout

Layout primitive that abstracts flexbox in order to define the layout for children components.

Requirements

This package relies on or makes use of

  • CSS Variables (Custom Properties)
  • ECMAScript 2015

Rationale

Abstraction on top of Flexbox for linear collections. No need to figure out justify-content/align-items values, etc.

Usage with React

import React from 'react';
import Stack from '@alexeyraspopov/stack-layout';

function MyDataList({ items }) {
  return (
    <Stack direction="vertical" spacing={1} alignment="stretch">
      {items.map(item => (
        <MyItem data={item} />
      ))}
    </Stack>
  );
}

Make sure related stylesheet is bundled as well:

@import url('@alexeyraspopov/stack-layout/style.css');

FAQs

Package last updated on 26 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc