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

@rmwc/grid

Package Overview
Dependencies
Maintainers
0
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmwc/grid

RMWC Grid component

14.3.5
latest
Source
npm
Version published
Maintainers
0
Created
Source

Layout Grid

Material design’s responsive UI is based on a column-variate grid layout. It has 12 columns on desktop, 8 columns on tablet and 4 columns on phone.

  • Module @rmwc/grid
  • Import styles:
    • Using CSS Loader
      • import '@rmwc/grid/styles';
    • Or include stylesheets
      • '@material/layout-grid/dist/mdc.layout-grid.css'
  • MDC Docs: https://material.io/develop/web/components/layout-grid/
<Grid>
  <GridCell span={4}>1</GridCell>
  <GridCell span={4}>2</GridCell>
  <GridCell span={4}>3</GridCell>
</Grid>
<Grid>
  {/* If you need additional control over height of your grid, or need to add SubGrids, you can add your own GridRow components. */}
  <GridRow>
    <GridCell span={6}>1</GridCell>
    <GridCell span={6}>
      <GridRow>
        <GridCell span={6}>a</GridCell>
        <GridCell span={6}>b</GridCell>
      </GridRow>
    </GridCell>
  </GridRow>
</Grid>

Grid

A Grid component

Props

NameTypeDescription
align"left" | "right"Specifies the alignment of the whole grid.
childrenReactNodeChildren for the Grid
fixedColumnWidthbooleanSpecifies the grid should have fixed column width.

GridCell

A Grid cell

Props

NameTypeDescription
align"middle" | "top" | "bottom"Specifies the alignment of cell
desktopnumberNumber of columns to span on a desktop.
ordernumberSpecifies the order of the cell.
phonenumberNumber of columns to span on a phone.
spannumberDefault number of columns to span.
tabletnumberNumber of columns to span on a tablet.

GridRow

By default, an inner grid component is included inside of . Use GridRow when doing nested Grids.

Keywords

rmwc

FAQs

Package last updated on 24 Oct 2024

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