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>
Syntax
import React, { Component } from 'react';
import { Container, Content, Thumbnail, Text } from 'native-base';
export default class ThumbnailExample extends Component {
render() {
return (
<Container>
<Content>
<Text>Square Thumbnail</Text>
<Thumbnail square source={require('./img/one.png')} />
<Thumbnail square source={require('./img/one.png')} />
<Text>Circular Thumbnail</Text>
<Thumbnail source={require('./img/two.png')} />
<Thumbnail source={require('./img/two.png')} />
</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. |