2
votes

I can't change the default size of the thumbnail from NativeBase. I can display the default circle, which is the small and the large one, but I want to display a bigger circle than the default size. Here's my code for the thumbnail :

<Thumbnail size={200} style={{margin: 30}} source={require('../../../public/images/profile/yellow.jpg')} />

The props size doesn't work, the thumbnail remains small.

My NativeBase version : 2.3.5

4

4 Answers

6
votes

Native Base Component doesn't have a size props, you should add width and height, and one more thing you shouldn't forget please add borderRadius divided by 2 to ensure the shape is retain Circle

<Thumbnail style={{width: 30, height: 30, borderRadius: 30/2}} source={require('../../../public/images/profile/yellow.jpg')} />
2
votes

You can simply increase the Thumbnail size by using this trick. Just take the property of scale with <Thumbnail/>.

Just copy-paste the below code in your app

<Thumbnail 
scaleX={3} scaleY={3} style={{margin: 30}} 
source={require('../../../public/images/profile/yellow.jpg')}/>

You can change the scale values as per your need. Let me know if this fixes your issue.

1
votes

The Thumbnail component from NativeBase doesn't have the size attribute. Try to set width and height properties of the style attribute

<Thumbnail style={{width: 100, height: 100, margin: 30}} source={require('../../../public/images/profile/yellow.jpg')} />
1
votes

NativeBase Thumbnail component comes with small and large props for size. You can also set width and height to have image with other dimensions

enter image description here