Skip to content

Latest commit

 

History

History
executable file
·
71 lines (65 loc) · 2.43 KB

Thumbnail.md

File metadata and controls

executable file
·
71 lines (65 loc) · 2.43 KB

Thumbnail

Thumbnail component works very similar to Image. It helps you to showcase an image with variuos dimensions and shapes. By default, Thumbnail renders an image in circular shape.
Replacing Component: React Native Image

Preview ios Thumbnail Preview android Thumbnail

Syntax

import React, { Component } from 'react';
import { Container, Header, Content, Thumbnail, Text } from 'native-base';
export default class ThumbnailExample extends Component {
  render() {
    return (
      <Container>
        <Header />
        <Content>
          <Text>Square Thumbnail</Text>
          <Thumbnail square source={{uri: 'Image URL'}} />
          <Thumbnail square small source={{uri: 'Image URL'}} />
          <Text>Circular Thumbnail</Text>
          <Thumbnail source={{uri: 'Image URL'}} />
          <Thumbnail large source={{uri: 'Image URL'}} />
        </Content>
      </Container>
    );
  }
}

Configuration

Property Default Option Description
source - - Image path for thumbnail.
square - - Represents shape of thumbnail.
By default thumbnail is circle in shape.
small - - Small thumbnail with width and height of 40px.
large - - Large thumbnail with width and height of 80px.