Skip to main content

NeoPopBack

A back-navigation row with a chevron icon, an optional heading, and an optional right-side element.

Usage

// dark mode example
import { NeoPopBack } from 'neopop-rn';

<NeoPopBack
heading="My Account"
colorMode="dark"
onPress={() => navigation.goBack()}
/>
// light mode example
import { NeoPopBack } from 'neopop-rn';
import { Text } from 'react-native';

<NeoPopBack
heading="Settings"
color="#0d0d0d"
colorMode="light"
rightElement={<Text style={{ color: '#0d0d0d' }}>Skip</Text>}
onPress={() => navigation.goBack()}
/>

Props

PropTypeDefaultDescription
onPress() => voidRequired. Called when the back row is tapped.
headingstringOptional text label shown to the right of the chevron.
colorstringColor applied to the chevron icon and heading text.
rightElementReact.ReactNodeArbitrary element rendered at the trailing end of the row.
textStyleStyleProp<TextStyle>Additional style applied to the heading text.
colorMode'dark' | 'light'Theme mode used when color is not provided.
styleStyleProp<ViewStyle>Additional style applied to the outer container.

colorConfig

NeoPopBack does not accept a colorConfig prop. Use the color prop to override the chevron and text color.

Notes

  • The chevron direction is always 'west' (pointing left) and is not configurable via props.
  • rightElement is pushed to the far trailing edge using justifyContent: 'space-between'.
  • When heading is omitted, only the chevron is rendered.