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

@piksl/grid

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@piksl/grid

- Establish a set of column `<Col />` in the horizontal space defined by row `<Row />`.

  • 1.5.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@piksl/grid

  • Establish a set of column <Col /> in the horizontal space defined by row <Row />.

  • Your content elements should be placed directly in the <Col />, and only <Col /> should be placed directly in<Row />.

  • The column grid system is a value of 1-12 to represent its range spans. For example, three columns of equal width can be created by <Col xl={4} />.

  • If the sum of <Col /> spans in a row are more than 12, then the overflowing <Col /> as a whole will start a new line arrangement.

API

Container

PropDescriptionTypeDefault
minHeightMinimum height of the <Container />string-
backgroundBackground of the <Container />string-
backgroundColorBackground-color of the <Container />string-
backgroundImageBackground-image of the <Container />string-
backgroundSizeBackground-size of the <Container />cover contain string-
backgroundPositionBackground-position of the <Container />string-
justifyVertical alignment children of the <Row /> insideflex-start flex-end center
space-between space-around space-evenly
-
classNameThe classname of the <Container />string-
idThe id of the <Container />string-
refThe ref that is passed to the <Container />any-
paddingTop and/or bottom padding of the <Container />
Use it like [top] or [top, bottom]
[number] [number, number]-

Row

PropDescriptionTypeDefault
fluidMakes the <Row /> fluidbooleanfalse
backgroundColorBackground-color of the <Row />string-
justifyHorizontal alignment of the <Col /> insideflex-start flex-end center
space-between space-around space-evenly
-
alignVertical alignmentflex-start flex-end center stretch-
wrapReverseReverse the order at wrapbooleanfalse
paddingTop and/or bottom padding of the <Row />
Use it like [top] or [top, bottom]
[number] [number, number][20, 20]
marginTop and/or bottom margin of the <Row />
Use it like [top] or [top, bottom]
[number] [number, number][0, 0]
borderRadiusBorder-radius of the <Row />string-
classNameThe classname of the <Row />string-
idThe id of the <Row />string-

Col

PropDescriptionTypeDefault
xsSpan of the <Col /> when window.innerWidth <= 576px1 2 3 4 5 6 7 8 9 10 11 1212
smSpan of the <Col /> when window.innerWidth between 577px and 768px1 2 3 4 5 6 7 8 9 10 11 1212
mdSpan of the <Col /> when window.innerWidth between 769px and 992px1 2 3 4 5 6 7 8 9 10 11 1212
lgSpan of the <Col /> when window.innerWidth between 993px and 1200px1 2 3 4 5 6 7 8 9 10 11 1212
xlSpan of the <Col /> when window.innerWidth > 1200px1 2 3 4 5 6 7 8 9 10 11 1212
minWidthMinimum width of the <Col />string-
maxWidthMaximum width of the <Col />string-
classNameThe classname of the <Col />string-
idThe id of the <Col />string-

The breakpoints of responsive grid follow BootStrap 4 media queries rules (not including occasionally part).

ConfigProvider

Wrap the <ConfigProvider /> around the components where you would like to use <Container />, <Row /> and <Col /> with a different styling then the default, without adjusting the properties continually.

Usage example

To create a layout like the example image below, the could would look like:

<Container justify="flex-end" >
    <Row
        justify="space-between"
        align="flex-start"
    >
        <Col xl={6} />
        <Col xl={3} />
    </Row>
</Container>

@piksl/grid example

FAQs

Package last updated on 31 Dec 2023

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