For AI agents: the complete documentation index is available at /1.x/llms.txt, the full documentation bundle is available at /1.x/llms-full.txt, and this page is available as Markdown at /1.x/guide/usage/style-customization.md.
v3 is stable. See what changed
  • English
  • 1.x
  • Style Customization

    You can customize the styling of GestureViewer.

    import { GestureViewer } from 'react-native-gesture-image-viewer';
    
    function App() {
      return (
        <GestureViewer
          animateBackdrop={false}
          width={400}
          height={400}
          containerStyle={{/* ... */}}
          backdropStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.90)' }}
          renderContainer={(children, { dismiss }) => <View style={{ flex: 1 }}>{children}</View>}
        />
      );
    }
    PropertyDescriptionDefault
    animateBackdropBy default, the background opacity gradually decreases from 1 to 0 during downward swipe gestures. When false, this animation is disabled.true
    widthThe width of content items. Default is window width.Dimensions width
    heightThe height of content items. Default is window height.Dimensions height
    containerStyleAllows custom styling of the container that wraps the list component.flex: 1
    backdropStyleAllows customization of the viewer's background style.backgroundColor: black; StyleSheet.absoluteFill;
    renderContainer(children, helpers)Allows custom wrapper component around <GestureViewer />.