1.0.16 • Published 7 years ago
react-native-apex-ui v1.0.16
A react native cross platform ui kit.
include
- Button
- Dialog
- Drawer
- ActionSheet
- Toast
- Tooltip
- Carousel
- Popover
- Tag
- TouchableRipple
- ...
Installation
- step 1
npm i react-native-apex-ui --save
- step 2
react-native link react-native-vector-icons
Get Started
UiThemeProvider
At the beginning, apex ui components require a UiThemeProvider
to be provided. You can’t use any components without wrapping the root component in <UiThemeProvider>
:
import {UiThemeProvider} from 'react-native-apex-ui';
const App = () => (
<UiThemeProvider>
<Root />
</UiThemeProvider>
);
Following that, you can use any of the components:
import {RippleButton, Toast} from 'react-native-apex-ui';
class SimpleToastExample extends Component {
state = {
open: false,
};
handleRequestOpen = () => {
this.setState({
open: true,
});
}
handleRequestClose = () => {
this.setState({
open: false,
});
};
render() {
return (
<View>
<RippleButton
caption='BUTTON'
backgroundColor='#2c8cff'
captionColor='#fff'
onPress={this.handleRequestOpen}
/>
<Toast
open={this.state.open}
message='Hello toast!'
onRequestClose={this.handleRequestClose}
/>
</View>
);
}
}
Examples
check out RNApexUIExample