Airframe GitHub Storybook
Component

ba-screen

Root of a React Native screen. Paints the theme background, sets the status bar, and applies safe-area insets

Airframe

Not Planned

Web Components

Not Planned

React

Not Planned

React Native

Beta
GitHub
Code Accessibility

A Web Components implementation is not planned for this component.

If you have any questions or need more information, please contact the design system team

A React implementation is not planned for this component.

If you have any questions or need more information, please contact the design system team

Prop Description Type Default
children ReactNode
theme Surface palette for this screen. Omit to follow {@link BaModeProvider }
(default in light mode, midnight-700 in dark). With no provider, this
is default.
BaTheme
statusBarStyle Status bar content style. Omit to follow the resolved theme background. StatusBarStyle
safeAreaTop When false, top inset is not applied (e.g. hero under the status bar). boolean true
safeAreaBottom When false, bottom inset is not applied.
Use with {@link BaScroll } on native bottom tab screens so the scroll view
owns the bottom inset (home indicator + overlaying tab bar). Context
insets alone do not include liquid glass tab bars.
boolean true
testID Used to locate this view in end-to-end tests. string
accessibilityLabel Overrides the text that's read by the screen reader when the user interacts with the element. By default, the
label is constructed by traversing all the children and accumulating all the Text nodes separated by space.
string
accessibilityHint An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label. string
accessibilityState Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on. AccessibilityState

Put BaScreen inside <BaModeProvider>. It reads its insets from SafeAreaProvider.

Put the page in <BaPageSegment>. When the page scrolls, put <BaScroll> between the screen and the segments.

BaScreen fills the screen. It paints the theme background, sets the status bar, and applies safe-area insets.

Omit theme to use the mode theme. Light mode is default. Dark mode is midnight-700. Pass theme to keep this screen on one palette. The safe-area gutters use that palette. With no BaModeProvider, an omitted theme is default.

A segment resolves its own theme. Pass the same theme on the segment when the band should match the screen. Children inside the segment read the segment theme.

Leave statusBarStyle unset. A light background uses dark-content. A dark background uses light-content. On Android the status bar background uses the screen colour. Pass statusBarStyle when the icons should differ from that, for example over a photo.

Top and bottom insets are on by default. Left and right insets are always applied. Set safeAreaTop={false} when a hero should run under the status bar. Set safeAreaBottom={false} on a screen under native bottom tabs, and let BaScroll own the bottom inset.

Omit theme and statusBarStyle. The background and the status bar follow the mode.

A screen with theme omitted
<BaScreen>
  <BaPageSegment>
    <BaContent>
      <BaText variant="header28">Hello</BaText>
    </BaContent>
  </BaPageSegment>
</BaScreen>

Pass theme on the screen and on the segment. The safe area and the band then share one palette. Leave statusBarStyle unset. A dark background such as midnight-700 uses light-content.

A screen and segment locked to midnight-700
<BaScreen theme="midnight-700">
  <BaPageSegment theme="midnight-700">
    <BaContent>
      <BaText variant="header28">Hello</BaText>
    </BaContent>
  </BaPageSegment>
</BaScreen>

Set safeAreaTop={false}. The segment draws from the top of the screen, under the status bar.

A screen with the top inset removed
<BaScreen safeAreaTop={false}>
  <BaPageSegment fill>
    <BaContent>
      <BaText variant="header28">Hello</BaText>
    </BaContent>
  </BaPageSegment>
</BaScreen>

On a screen under native bottom tabs, set safeAreaBottom={false}. Put BaScroll inside the screen so the scroll view keeps the bottom inset. The rest of that setup is on ba-scroll.

A tab screen where BaScroll owns the bottom inset
<BaScreen safeAreaBottom={false}>
  <BaScroll>
    <BaPageSegment>
      <BaContent>
        <BaText variant="body16">Tab content</BaText>
      </BaContent>
    </BaPageSegment>
  </BaScroll>
</BaScreen>

BaScreen keeps the resolved theme background, and the status bar that follows it. Increase Contrast on iOS, and High contrast text on Android, do not swap that background for a system colour.

Greyscale and Invert colours are painted by the system over the whole screen.

State: BaScreen is a non-interactive container

⇥ Tab

Focus moves through the controls on the screen

Designing Developing Components BAgel helper Web QA React Native QA britishairways.com Careers Cookie policy