Skip to content

Latest commit

 

History

History
33 lines (29 loc) · 1.2 KB

StackedLabel.md

File metadata and controls

33 lines (29 loc) · 1.2 KB

stacked-label-headref

Stacked Label

The stackedLabel property creates an Input component that places the label on top of input element which appears like a stack. This can also be used along with placeholder.

Preview ios stacked-label-headref Preview android stacked-label-headref

Syntax

import React, { Component } from 'react';
import { Container, Header, Content, Form, Item, Input, Label } from 'native-base';
export default class StackedLabelExample extends Component {
  render() {
    return (
      <Container>
        <Header />
        <Content>
          <Form>
            <Item stackedLabel>
              <Label>Username</Label>
              <Input />
            </Item>
            <Item stackedLabel last>
              <Label>Password</Label>
              <Input />
            </Item>
          </Form>
        </Content>
      </Container>
    );
  }
}