Skip to content

Latest commit

 

History

History
executable file
·
113 lines (106 loc) · 3.64 KB

Thumbnail.md

File metadata and controls

executable file
·
113 lines (106 loc) · 3.64 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

{% codetabs name="React Native", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Content, Thumbnail, Text } from 'native-base'; export default class ThumbnailExample extends Component { render() { const uri = "https://facebook.github.io/react-native/docs/assets/favicon.png"; return (

Square Thumbnail {% raw %}<Thumbnail square small source={{uri: uri}} />{% endraw %} {% raw %}<Thumbnail square source={{uri: uri}} />{% endraw %} {% raw %}<Thumbnail square large source={{uri: uri}} />{% endraw %} Circular Thumbnail {% raw %}<Thumbnail small source={{uri: uri}} />{% endraw %} {% raw %}<Thumbnail source={{uri: uri}} />{% endraw %} {% raw %}<Thumbnail large source={{uri: uri}} />{% endraw %} ); } } {%- language name="Vue Native", type="vue" -%} Square Thumbnail Circular Thumbnail

<script> import logo from "favicon.png"; export default { data: function() { return { logo: logo, }; } }; </script>

{%- endcodetabs %}

Note: To have Thumbnail of custom size, specify height, width and borderRadius within style.

Configuration

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