Skip to content

Latest commit

 

History

History
executable file
·
200 lines (191 loc) · 6.11 KB

Button.md

File metadata and controls

executable file
·
200 lines (191 loc) · 6.11 KB

button-def-headref

Button

Button is a pure NativeBase component.
Buttons are the integral part of an application. They are used for various purposes like, submit or reset a form, navigate, performing interactive actions such as showing or hiding something in an app on click of the button, etc.

Preview ios button-def-headref Preview android button-def-headref

Contents:

Syntax {% codetabs name="Basic", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Content, Button, Text } from 'native-base'; export default class ButtonExample extends Component { render() { return (

// NativeBase default style Click Me! ); } } {%- language name="Advanced", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Content, Button, Text } from 'native-base'; export default class ButtonExample extends Component { render() { return ( // NativeBase default style Click Me! ); } } {%- endcodetabs %}

  • Supports React Native app on both iOS and Android devices.
  • Button component takes input such as: Text, Icon, Text with Icon.
  • NativeBase gives you privilege to customize the props of this component.
    Example: To have custom style for button, include them in style prop of button.
  • Intakes user-defined styles.
  • NativeBase has provided its users with enormous list of props that can be used with Button.
  • Replacing Component:

**Configuration**
Property Default Option Description
style - - Defines button style
active - boolean Boolean value to describe state of Button
transparent true boolean Renders child element of button
bordered - - Applies outline button style.
rounded - - Renders button with slightly round shaped edges
block - - Block level button
full - - Full width button
disabled true boolean Disables click option for button
small - - For small size button
large - - For large size button
iconRight - - Right Padding for the icon
iconLeft - - Left Padding for the icon.
light - boolean Add a light white background color to your component.
primary - boolean Add a blue background color to your component
success - boolean Add a green background color to your component
info - boolean Add a light blue background color to your component as shown
warning - boolean Add a yellow warning background color to your component
danger - boolean Add a red background color to your component
dark - boolean Add a black background color to your component