New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ludens-reklame/react-crisscross

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ludens-reklame/react-crisscross

A flexible layout component for React based on CSS flexbox

  • 1.0.1
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

GitHub issues PRs Welcome GitHub license Build Status

React Crisscross :triangular_ruler:

A simple and flexible layout component for React based on CSS flexbox

Installation

With yarn

yarn add react-crisscross

With npm

npm install react-crisscross


Layout component

import Layout from 'react-crisscross';

<Layout container>
  <Layout item>{/* Content */}</Layout>
</Layout>;

Properties

You have accesss to all the same properties as in flexbox.

Media queries
PropertyValueDescription
xsobjectUse container and/or item properties on the xs media query
smobjectUse container and/or item properties on the sm media query
mdobjectUse container and/or item properties on the md media query
lgobjectUse container and/or item properties on the lg media query
xlobjectUse container and/or item properties on the xl media query
Container properties
PropertyValueDescription
direction'row' (default), 'column', 'row-reverse', 'column-reverse'Same as the flex-direction property in flexbox.
justify'flex-start' (default), 'flex-end', 'center', 'space-between', 'space-around'Same as the justify-content property in flexbox.
alignItems'stretch' (default), 'flex-start', 'flex-end', 'center', 'baseline'Same as the align-items property in flexbox.
wrap'nowrap' (default), 'wrap', 'wrap-reverse'Same as the flex-wrap property in flexbox.
gapnumberSize of gap between each flex item.
Item properties
PropertyValueDescription
flexstring (eg. '1 0 auto')Same as the flex property in flexbox.
grownumberSame as the flex-grow property in flexbox.
shrinknumberSame as the flex-shrink property in flexbox.
alignSelf'auto' (default), 'flex-start', 'flex-end', 'center', 'baseline', 'stretch'Same as the flex-grow property in flexbox.
ordernumberSame as the order property in flexbox.

Layout Provider

Sometimes you want to override the default settings for the layout, such as media queries. React Crisscross ships with a module that can help you inject custom settings. Here's an example:

import Layout, { LayoutProvider } from 'react-crisscross';

const mySettings = {
  mediaQueries: {
    lg: 1500
  }
}

<LayoutProvider settings={mySettings}>
  <Layout container>
    <Layout item>
      {/* Content */}
    </Layout>
  </Layout>
</LayoutProvider>
Default settings

These settings can be overwritten by the LayoutProvider.

const settings = {
  mediaQueries: {
    xs: 0,
    sm: 600,
    md: 960,
    lg: 1280,
    xl: 1920
  },
  columns: 12
};

FAQs

Package last updated on 17 Jul 2018

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