Layout

The Layout component is intended for building single or multi-column layouts using predefined typologies.

import React from "react";
import { Layout } from "@nimbus-ds/patterns";
import { Box, Text } from "@nimbus-ds/components";

const Example: React.FC = () => {
  const exampleBox = (
    <Box
      display="flex"
      alignItems="center"
      justifyContent="center"
      backgroundColor="primary-surface"
      borderColor="primary-interactive"
      borderStyle="dashed"
      borderWidth="1"
      borderRadius="2"
      width="100%"
      padding="4"
      boxSizing="border-box"
    >
      <Text fontSize="caption" textAlign="center" color="primary-interactive">
        Content
      </Text>
    </Box>
  );

  return (
    <Layout columns="1">
      <Layout.Section>{exampleBox}</Layout.Section>
      <Layout.Section>{exampleBox}</Layout.Section>
      <Layout.Section>{exampleBox}</Layout.Section>
    </Layout>
  );
};

export default Example;

Instalá el componente via terminal.

npm install @nimbus-ds/layout

Additional props are passed to the <Layout> element. See div docs for a list of props accepted by the <Layout> element.