Socket
Book a DemoInstallSign in
Socket

clarity-react-responsive-grid-layout

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clarity-react-responsive-grid-layout

A responsive grid layout for React apps.

2.0.9
latest
Source
npmnpm
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

clarity-react-responsive-grid-layout

NPM version NPM license NPM total downloads NPM monthly downloads

A responsive grid layout for React apps. The minimal API is to create a clarity-react-responsive-grid-layout, populate it with an array of card components, and add the desired card width and padding between cards.

Install

npm clarity-react-responsive-grid-layout

Features

  • Responsive grid layout for cards.

Dependencies

Version 15.x.x

  • react
  • react-dom

Minimal Example

import React from "react";
import GridLayout from "clarity-react-responsive-grid-layout";
import {TestCard} from "../../../components";
import styles from "./styles";

const TestComponent = props => {
    const { style } = props;

    const createCardComponents = () => {
        return [<TestCard />, <TestCard />, <TestCard />, <TestCard />, <TestCard />];
    };

    return (
        <div style={Object.assign({}, styles.container, style)}>
            <GridLayout style={styles.gridLayout} cardWidth={400} padding={24} cards={createCardComponents()} />
        </div>
    );
};

export default TestComponent;

Props

cardWidth number

  • The desired width for all cards.

padding number

  • The desired padding between cards.
  • NOTE: Padding on top, bottom, left and right of gridLayout should be set through the style prop.

cards [React.Component]

  • The array of card components that will be rendered in order on the gridLayout.

leftAlign boolean

  • Align the cards to the left side of the grid.
  • NOTE: If not supplied the default is to center the cards on the grid.

Keywords

react

FAQs

Package last updated on 19 Jul 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.