Skip to content

Latest commit

 

History

History
executable file
·
40 lines (36 loc) · 1.52 KB

HeaderAndFooter.md

File metadata and controls

executable file
·
40 lines (36 loc) · 1.52 KB

card-headfoot-headref

Card Header and Footer

To add an optional header and/or footer within a card, include header / footer prop with the CardItem.

  • Card Header: Include header prop with first instance of CardItem within Card.
  • Card Footer: Include footer prop with last instance of CardItem within Card.

Preview ios card-headfoot-headref Preview android card-headfoot-headref

Syntax

import React, { Component } from 'react';
import { Container, Header, Content, Card, CardItem, Text, Body } from 'native-base';
export default class CardHeaderFooterExample extends Component {
  render() {
    return (
      <Container>
        <Header />
        <Content>
          <Card>
            <CardItem header>
              <Text>NativeBase</Text>
            </CardItem>
            <CardItem>
              <Body>
                <Text>
                  //Your text here
                </Text>
              </Body>
            </CardItem>
            <CardItem footer>
              <Text>GeekyAnts</Text>
            </CardItem>
         </Card>
        </Content>
      </Container>
    );
  }
}