Components

Width container

Pseudo-component

A simple container to limit the width of its contents.

This is used by the page components to control the width of the page contents. Users will not typically need to use this.

Contents

Props
NameTypeDefaultDescription
idstring-'id' attribute to place on the base HTML element
classBlockstring-Block name override in BEM style classes applied to all elements
classModifiersModifiers-BEM style modifiers to apply to the base HTML element
classNamestring-Extra classes to apply to the base HTML element
maxWidthnumber-Maximum width of the container in px units (-1 for full width)

Stories

Standard

A standard Width container with the width inherited from govuk-frontend.

Contents

Custom width

A Width container with a custom width set in pixels.

Contents

Full width

A Width container which does not limit the width of its contents. This is useful for some internal systems such as dashboards.

Contents