Saturday 18 January 2020

NativeBase Anatomy

NativeBase is a free and open source UI component library for React Native to build native mobile apps for iOS and Android platforms.

One of our main goal with NativeBase 2.0 is to make it easy to theme the components with very little changes to components themselves.

//cmd

npm install -g expo-cli
expo init native-base
cd native-base
npm install native-base --save
expo install expo-font

//app.js

import React from 'react';
import { Container, Header, Title, Content, Footer, FooterTab, Button, Left, Right, Body, Icon, Text } from 'native-base';


export default function App() {
  return (
    <Container>
      <Header>
        <Left>
          <Button transparent>
            <Icon name='menu' />
          </Button>
        </Left>
        <Body>
          <Title>Header</Title>
        </Body>
        <Right />
      </Header>
      <Content padder>
        <Text>
          This is Content Section
          </Text>
      </Content>
      <Footer>
        <FooterTab>
          <Button full>
            <Text>Footer</Text>
          </Button>
        </FooterTab>
      </Footer>
    </Container>
  );
}

reference:
https://docs.nativebase.io/

No comments:

Post a Comment