BridgeBeta
  • Brand
  • Digital Assets
    Foundations
    Icons
    Components
    Templates
  • Resources
    Design Tokens
    How-tos
    Best Practices
    Libraries
    Accessibility
    Products List
  • Support
    • Overview
    • Actions
      • Overview
      • Button
      • ContextMenu
      • Link
    • Controls
      • Overview
      • Checkbox
      • Tag
      • Toggle
    • Forms
      • Overview
      • DatePicker
      • FileUploader
      • Input
      • NumberInput
      • RadioButton
      • Search
      • Select
      • Slider
      • TextArea
      • TextInput
    • Hooks
      • useIsomorphicLayoutEffect
      • useMediaQuery
      • useSettings
    • Navigation
      • Overview
      • AnchorNavigation
      • BannerNavigation
      • Breadcrumb
      • Footer
      • InfoBar
      • MainNavigation
      • SecondaryNavigation
      • StepNavigation
      • SubNavigation
    • Overlay
      • Overview
      • Credits
      • Modal
      • ModalWrapper
      • Notification
      • Tooltip
    • Structure
      • Overview
      • Accordion
      • AuthLayout
      • Avatar
      • Callout
      • Card
      • ContentSwitcher
      • Empty
      • Hero
      • InlineLoading
      • Item
      • List
      • Loading
      • mdxComponents
      • Module
      • Pagination
      • ReadMore
      • Story
      • Table
      • Tabs
      • Text
      • Unit
      • User
      • WFPCoreProvider
      • Wrapper
Components
Structure
Wrapper

Wrapper

  • Design
  • Code
  • Props

Import statement

import { Wrapper } from "@wfp/react"

Here’s a basic example of how to use the Wrapper:

<Wrapper pageWidth="md">This is the content.</Wrapper>

In this example, the Wrapper displays a message "This is the content." with an optional custom CSS class custom-class, an id wrapper-id, and sets the page width for the inner Wrapper component to lg (large).

<Wrapper id="wrapper-id" className="custom-class" pageWidth="lg">
This is the content.
</Wrapper>

Props

Use the props below to change the behaviour of the Wrapper component:

pageWidth

Use the pageWidth prop to set the width of the Wrapper component.

PropertyCSS NameValue
'xs'.wfp--wrapper--width-xsmax-width: 500px;
'sm'.wfp--wrapper--width-smmax-width: 700px;
'md'.wfp--wrapper--width-mdmax-width: 1000px;
'lg'.wfp--wrapper--width-lgmax-width: 1200px;
'full'.wfp--wrapper--width-fullmax-width: 100%;
'narrow'--
'narrower'--
'narrowest'--

mobilePageWidth

Use the mobilePageWidth prop to set the width of the Wrapper component on mobile devices.

'full' | 'lg' | 'md' | 'sm'

spacing

Use the spacing prop to add spacing to the top and bottom of the Wrapper component.

PropertyCSS NameValue
md.wfp--wrapper--spacing-mdpadding-top: $spacing-05;
padding-bottom: $spacing-05;
xl.wfp--wrapper--spacing-xlpadding-top: $spacing-08;
padding-bottom: $spacing-08;

background

Use the background prop to set the background colour of the Wrapper component.

PropertyCSS NameValue
light.wfp--wrapper--background-lighterbackground: $layer-primary;
dark.wfp--wrapper--background-darkbackground: $background-brand;

On this page

  • Props
  • pageWidth
  • mobilePageWidth
  • spacing
  • background

References

  • Storybook
Storybook
Figma library
Contact us
2025 © World Food Programme