@rnhooks/accessibility-info
v0.0.2
Published
React Native hook for Accessibility Info
Downloads
3
Readme
@rnhooks/accessibility-info
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 |