Airframe GitHub Storybook
Component

ba-scroll

Scrolls the body of a React Native screen. Page spacing stays on the segments inside it, so the scroll indicator sits on the screen edge

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
contentInsetAdjustmentBehavior Defaults to "automatic" so liquid glass tab bars / nav bars inset
content. Use "never" when a parent (e.g. screens SafeAreaView) already
owns the bottom inset and you need to avoid a large empty gap.
"automatic" | "scrollableAxes" | "never" | "always" automatic
fill Grow short content to the scroll viewport. Sets content flexGrow: 1 so
taller content can still grow and scroll.
boolean false
testID Used to locate this view in end-to-end tests. string baScroll
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 BaScroll inside <BaScreen>. Put <BaPageSegment> inside the scroll view.

BaScroll is the scrolling body of a screen. It fills the space left by BaScreen.

Keep page margin and vertical padding on the segment. A padded view around BaScroll insets the scroll indicator from the screen edge.

contentInsetAdjustmentBehavior defaults to automatic. On iOS, a translucent navigation bar or tab bar can inset the scroll content. A press on a button or link inside the scroll view registers while the keyboard is open. A press on empty space dismisses the keyboard.

On a screen under native bottom tabs, set safeAreaBottom={false} on BaScreen. The scroll view then owns the bottom inset, including the home indicator and an overlaying tab bar. Insets from react-native-safe-area-context leave out a liquid-glass tab bar.

Leave fill unset. Content keeps its own height, so a short page ends after the last item. Set fill when a short page should grow to the viewport, and set fill on the segment so the band fills that height. Taller content still scrolls.

Set contentInsetAdjustmentBehavior to never when the screen already applies the bottom inset and a large empty gap appears under the content.

Put the segments inside BaScroll. Wrap neighbouring segments in BaPageSegmentGroup so matching themes share one block of padding.

A screen that scrolls its segments
<BaScreen>
  <BaScroll>
    <BaPageSegmentGroup>
      <BaPageSegment>
        <BaContent>
          <BaText variant="header28">Your trip</BaText>
        </BaContent>
      </BaPageSegment>
      <BaPageSegment>
        <BaContent>
          <BaText variant="body16">Flight details</BaText>
        </BaContent>
      </BaPageSegment>
    </BaPageSegmentGroup>
  </BaScroll>
</BaScreen>

Set safeAreaBottom={false} on the screen. Leave contentInsetAdjustmentBehavior at automatic.

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

Keep the header as a sibling of BaScroll. The header stays put. The segments inside the scroll view move.

A header above a scrolling body
<BaScreen>
  <BaPageSegment>
    <BaContent>
      <BaText variant="header28">Your trip</BaText>
    </BaContent>
  </BaPageSegment>
  <BaScroll>
    <BaPageSegmentGroup>
      <BaPageSegment>
        <BaContent>
          <BaText variant="body16">Flight details</BaText>
        </BaContent>
      </BaPageSegment>
    </BaPageSegmentGroup>
  </BaScroll>
</BaScreen>

Set fill on BaScroll and on the segment. The scroll view grows its content to the viewport, and the segment fills that height.

A short scrolling page that still fills the screen
<BaScreen>
  <BaScroll fill>
    <BaPageSegment fill>
      <BaContent>
        <BaText variant="header28">Hello</BaText>
      </BaContent>
    </BaPageSegment>
  </BaScroll>
</BaScreen>

BaScroll scrolls on the vertical axis. horizontal is not a available prop, so this component cannot scroll sideways.

VoiceOver and TalkBack move through the controls inside the scroll view in layout order. The component does not add its own announcements. Pass accessibilityLabel when the scroll view itself needs a name.

A press on a button or link inside the scroll view registers while the keyboard is open. A press on empty space dismisses the keyboard.

State: BaScroll is a non-interactive container

⇥ Tab

Focus moves through the controls inside the scroll view

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