react-native-elegant-header
Version:
Fully customizable, easy to use Elegant Header component for React Native
120 lines (83 loc) • 4.42 kB
Markdown
<img alt="React Native Elegant Header" src="assets/logo.png" width="1050"/>
[](https://github.com/WrathChaos/react-native-elegant-header)
[](https://github.com/WrathChaos/react-native-elegant-header)
[](https://www.npmjs.com/package/react-native-elegant-header)
[](https://www.npmjs.com/package/react-native-elegant-header)

[](https://opensource.org/licenses/MIT)
[](https://github.com/prettier/prettier)
<table>
<tr>
<td align="center">
<img alt="React Native Elegant Header"
src="assets/Screenshots/react-native-elegant-header.png" />
</td>
<td align="center">
<img alt="React Native Elegant Header"
src="assets/Screenshots/react-native-elegant-header-with-back-button.png" />
</td>
</tr>
</table>
Add the dependency:
```bash
npm i react-native-elegant-header
```
<h5><i>Zero Dependency</i></h5>
```jsx
import ElegantHeader from "react-native-elegant-header";
```
```jsx
<ElegantHeader
title="Welcome"
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tristique fermentum magna, porttitor vulputate arcu dapibus et."
/>
```
```jsx
<ElegantHeader
title="Welcome"
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tristique fermentum magna, porttitor vulputate arcu dapibus et."
enableBackButton
onPress={() => {}}
/>
```
You can checkout the example project 🥰
Simply run
- `npm i`
- `react-native run-ios/android`
should work of the example project.
| Property | Type | Default | Description |
| ----------- | :----: | :-------: | --------------------- |
| title | string | undefined | change the title |
| description | string | undefined | change the descrition |
| Property | Type | Default | Description |
| ------------------------- | :-------: | :-------: | ----------------------------------------------------------------------- |
| enableBackButton | boolean | false | let you enable the back button (must use it for button) |
| onPress | function | undefined | set your own logic for the back button functionality when it is pressed |
| TextComponent | Text | default | set your own component instead of default react-native Text component |
| TouchableComponent | Image | default | set your own component instead of default react-native Image component |
| style | ViewStyle | default | set or override the style object for the main container |
| backButtonImageStyle | ViewStyle | default | set or override the style object for the back button's image style |
| titleTextStyle | TextStyle | default | set or override the style object for the title's text style |
| descriptionTextStyle | TextStyle | default | set or override the style object for the description's text style |
| descriptionContainerStyle | ViewStyle | default | set or override the style object for the description's container style |
## Future Plans
- [x] ~~LICENSE~~
- [ ] Write an article about the lib on Medium
# Change Log
Change log will be here !
## Author
FreakyCoder, kurayogun@gmail.com
## License
React Native Elegant Header is available under the MIT license. See the LICENSE file for more info.
```
```