1.1.8 • Published 3 years ago

reactnative-ui-bootstrap v1.1.8

Weekly downloads
90
License
-
Repository
github
Last release
3 years ago

reactnative-ui-bootstrap

Apply bootstrap style like website to your react-native project. Easy use for developers move from web-development to react-native development. Ready-made components help you save time in styling components. Enjoy!

New update 💛

Support more break-point: sm,md,lg,xl.

Feel free to feed back me at GitHub about this update

Installation

Easy installation.

npm install reactnative-ui-bootstrap

Usage

If you are new in web-development, please see Bootstrap Documents. If you've already have experience in web-development, please Enjoy!

How to use class.

import {Div} from 'reactnative-ui-bootstrap'

...
      return(
        <Div className={'row'}>
          <Div className={'col-6 col-md-9'}>
            ...Some content here
          </Div>
        </Div>
      )
...

Components

Some component in reactnative-ui-bootstrap:

  • Div
  • Button
  • Card
  • Input
  • Gradient
  • A
  • P
  • AnimatedView
  • Popup

Default color

'PRIMARY' : '#007bff' 'SECONDARY' : '#6c757d' 'SUCCESS' : '#28a745' 'DANGER' : '#dc3545' 'WARNING' : '#ffc107' 'INFOR' : '#17a2b8' 'LIGHT' : '#f8f9fa' 'DARK' : '#343a40'

Div

Has all default props of View Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.

Button

Has all default props of Button Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
type"primary"stringApply Bootstrap button color by default color.
loadingColor"white"stringSpinner color.
backGroundnullstringCustom background color.
disabledfalsebooleanSet to true to disable button.
radius0numberCustom button radius.
uppercasefalsebooleanSet to true to set uppercase text in inside.
lowercasefalsebooleanSet to true to set lowercase text in inside.
capitalizefalsebooleanSet to true to set capitalize text in inside.
loadingfalsebooleanSet to true to show loading.
shadowfalsebooleanSet to true to enable button shadow.
shadowColornullstringCustom button shadow color.
shadowElevationfalsenumberCustom button shadow elevation.
shadowWidthnullnumberCustom button shadow width.
shadowHeightfalsenumberCustom button shadow height.
shadowOpacitynullnumberCustom button shadow opacity.
shadowRadiusnullnumberCustom button shadow radius.
roundfalsebooleanChange button style to round.
transparentfalsebooleanChange button style to transparent.
onlyIconfalsebooleanDisplay only icon in button.
loadingSize"small"stringSize of loading in button: small, large or number
opacity0.8numberOpacity when click into button.
iconnullstringName of the icon.
iconSize14numberSize of the icon.
iconFamilynullstringFont family of the icon.
textStyle{}anyStyle apply to content inside.
fullfalsebooleanButton show full width.

Card

Has all default props of View Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
imageHeaderfalsebooleanApply image to top of card. Only visible when prop imageHeaderSource has value and this set to true
imageHeaderSourcenullstringImage header source.
imageHeaderHeight200numberImage header height.
styleImageHeader{}anyImage header custom style.
imageBottomfalsebooleanApply image to bottom of card. Only visible when prop imageBottomSource has value and this set to true
imageBottomSourcenullstringImage bottom source.
imageBottomHeight200numberImage bottom height.
styleImageBottom{}anyImage bottom custom style.
styleContent{}anyCustom style content in card.
headerfalsebooleanApply header on top of card. Only visible when prop headerContent has value and this set to true
headerContentnullanyContent apply to header. (String or Component are accepted)
headerTextStyle{}anyStyle apply to header when headerContent is string
footerfalsebooleanApply footer on top of card. Only visible when prop footerContent has value and this set to true
footerContentnullanyContent apply to footer. (String or Component are accepted)
footerTextStyle{}anyStyle apply to footer when footerContent is string

Input

Has all default props of TextInput Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
bordertruebooleanApply border style to input
underlinefalsebooleanApply underline style to input
roundfalsebooleanApply round style to input
borderlessfalsebooleanApply borderless style to input
outLineColor'#c3c3c3'stringBorder color of input
hightLightColor'#2fbec3'stringBorder color of input when input is focused
placeholderTextColor'#959595'stringPlaceholder color of input
descriptionInBottomnullstringDescription in bottom of input
descriptionInBottomStyle{}anyStyle of description in bottom
labelnullstringLabel on top of input
labelStyle{}anyStyle of label
inputStyle{}anyCustom style of input
iconFrontnullanyIcon component
iconBacknullanyIcon component

Gradient

Has all default props of View Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space. className not stable in this component
height80numberApply height to component
width80numberApply width to component
horizontaltruebooleanDirection of gradient is horizontal. Set to false to get vertical direction
firstColor"#c94b4b"stringFirst gradient color
secondColor"#4b134f"stringSecond gradient color
revertfalsebooleanSet to true to revert gradient direction
contentStyle{}anyStyle of content

A

Has all default props of TouchableOpacity Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
hrefnullstringLink will open in browser.

P

Has all default props of Text Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
h1falsebooleanScale font size to h1.
h2falsebooleanScale font size to h2.
h3falsebooleanScale font size to h3.
h4falsebooleanScale font size to h4.
h5falsebooleanScale font size to h5.
pfalsebooleanScale font size to p.
colornullstringSet text color.
boldfalsebooleanSet text bold.
italicfalsebooleanSet text italic.
centerfalsebooleanSet text center.
sizenullnumberSet text size.

AnimatedView

Has all default props of Modal Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
animatePropertyNamenullarrayArray of style props want to animate. Example [{property: 'marginTop',startValue: -10, endValue: 15, animateDuration: 1000, animationDelay: 500 , easing: 'bounce'}] animationDelay should start from 500. If want to 2 animations start at the same time, you should set animationDelay have same value. All animation easing support: 'bounce','cubic','back','elastic','ease','inOut','in','out','sin','linear','quad'
shouldStartAnimationfalsebooleanSet to true to start animation.

Popup

Has all default props of View Component.

PropDefaultTypeDescription
className""stringApply Bootstrap file by apply classes above. Separate by space.
showPopupfalseanySet to true to show popup.
styleContent{}anyStyle of content.
popUpWidth(width*2)/3 (width of screen)numberWidth of popup.
exitWithOutsideClicktruebooleanSet to false to disable exit pop up when click outside of popup.
popupBackground'#00000033'stringBackground color of outside
popUpPosition'middle'stringPosition of popup. Support position: 'middle', 'bottom','top'
customExitButtonnullanyComponent to replace default exit button.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Thanks for your interested.

License

MIT

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago