Skip to content

react-native-hooks/accessibility-info

Repository files navigation

@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

About

React Native hook for Accessibility Info

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published