@rnhooks/accessibility-info

    0.0.2 • Public • Published

    @rnhooks/accessibility-info Build Status Maintainability

    React Native hook for Accessibility Info

    Installation

    yarn add @rnhooks/accessibility-info

    Usage

    import useAccessibilityInfo from '@rnhooks/accessibility-info';
    
    function App() {
      const isScreenReaderEnabled = useAccessibilityInfo();
    
      return (
        <View style={styles.container}>
          <Text style={styles.type}>Screen reader is:</Text>
          <Text style={styles.effectiveType}>
            {isScreenReaderEnabled ? 'on' : 'off'}
          </Text>
        </View>
      );
    }

    Output

    Name Type Default Description
    isScreenReaderEnabled boolean false true when the screen reader is enabled and false otherwise

    Install

    npm i @rnhooks/accessibility-info

    DownloadsWeekly Downloads

    4

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    14.7 kB

    Total Files

    11

    Last publish

    Collaborators

    • divyanshu013
    • pritishvaidya