react-native-overflow
v0.1.1
Published
A simple component that automatically displays as many children as will fit, and an overflow button if needed.
Maintainers
Readme
A simple component that dynamically renders as many children as will fit, along with an overflow button if needed.
Installation
yarn add react-native-overflow
Usage
- BYOB (Bring Your Own Button)
- supports flex direction
columnandrow
import Overflow from "react-native-overflow";
// ...
<Overflow
maxVisible={3}
style={styles.toolbarRight}
OverflowButton={<MyButton text="..." onPress={showOverflowMenu} />}
>
<MyButton text="Share" onPress={onShare} />
<MyButton text="Files" onPress ={onFiles} />
<MyButton text="Explore" onPress={onExplore} />
<MyButton text="Options" onPress={onOptions} />
</Overflow>
Compatibility
| Target | Requirements | Reason |
|--------|--------------| ------ |
| React Native | >0.78 + new arch | Synchronous layout measurement |
| Expo | >SDK 52 | New Arch enabled |
| Expo Go | >SDK 53 | New Arch enabled |
| Web | react-native-web | Needs <View /> |
Enhanced web compatibility could be added in the future (PRs welcome).
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
