Version 0.7.0 - Alpha
Container
Layout

Container

The container component let you use our default max-width and center the content on the page.

Usage

import { Container } from "@backstage/ui";

<Container>Hello World!</Container>

API reference

PropTypeDefaultResponsive
gap
0.511.5234567891011121314string
4Yes
className
string
-No
style
CSSProperties
-No

Examples

Simple

A simple example of how to use the Container component.

<Container>
  <Box>Hello World</Box>
  <Box>Hello World</Box>
  <Box>Hello World</Box>
</Container>

Responsive padding & margin

The Container component also supports responsive values, making it easy to create responsive designs.

<Container paddingY={{ xs: 'sm', md: 'md' }}>
  <Box>Hello World</Box>
  <Box>Hello World</Box>
  <Box>Hello World</Box>
</Container>

Theming

Our theming system is based on a mix between CSS classes, CSS variables and data attributes. If you want to customise this component, you can use one of these class names below.

Changelog