Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native cover image

// You want `resizeMode`
The options are 'cover' | 'contain' | 'stretch' | 'repeat' | 'center'
     
<Image
  style={{
    width: size,
    height: size,
    resizeMode: "contain", // <--
  }}
  source={...}
/>
 
PREVIOUS NEXT
Tagged: #react #native #cover #image
ADD COMMENT
Topic
Name
5+1 =