Sign up and get 15% off every plan.

Sign up
Menu
GridsMantine UIMIT licenceFree

Uneven grid

Placeholder blocks in rows of columns with different widths.

Add it to your project

Or install the packages yourselfTerminal
npm install @mantine/core

The code

components/GridAsymmetrical/GridAsymmetrical.tsxReact
/**
 * Component from Mantine UI, https://ui.mantine.dev
 * MIT License, Copyright (c) 2022 Vitaly Rtischev. Full text: https://github.com/mantinedev/ui.mantine.dev/blob/master/LICENCE
 */
import { Container, Grid, Skeleton } from '@mantine/core';

const child = <Skeleton height={140} radius="md" animate={false} />;

export function GridAsymmetrical() {
  return (
    <Container my="md">
      <Grid>
        <Grid.Col span={{ base: 12, xs: 4 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 8 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 8 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 4 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 3 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 3 }}>{child}</Grid.Col>
        <Grid.Col span={{ base: 12, xs: 6 }}>{child}</Grid.Col>
      </Grid>
    </Container>
  );
}