Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
¿Cómo puedo llenar texto con imagen o gif en reaccionar nativo?

He intentado replicar este https://codepen.io/iamdejean/pen/wvwjjer . Pero no puedo hacer eso. He intentado como el siguiente:

 import React from 'react' import { ImageBackground, StyleSheet, Text, View, Image } from 'react-native'; import { TouchableOpacity } from 'react-native-gesture-handler' export const CustomGifContainer = ({onPress, text, image}) => { return ( <View style={GifContainerStyles.container}> <TouchableOpacity onPress={onPress} style={GifContainerStyles.Gifcontainer} activeOpacity={ 0.5} > <ImageBackground source={image} style={GifContainerStyles.GifBackground}> <View style={GifContainerStyles.Gifoverlay}> <Text style={GifContainerStyles.text}>{text}</Text> </View> </ImageBackground> </TouchableOpacity> </View> ) }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

react-native-masked-view puede hacer lo que está buscando, aunque no tiene soporte para la web.

 export default function CustomGifContainer ({onPress, text, imgSource,imgDimensions={}}){ const {width=600,height=600} = imgDimensions return ( <TouchableOpacity style={{backgroundColor:'rgba(0,0,0,.25)',margin:5}} onPress={onPress} > <MaskedView style={{padding:5}} maskElement={ /*maskElement needs transparent background*/ <View style={{backgroundColor:'transparent'}}> <View style={styles.textWrapper}> <Text style={styles.text}>{text}</Text> </View> </View> } > <Image source={imgSource} style={{width,height,alignSelf:'center'}} resizeMode="cover" /> </MaskedView> </TouchableOpacity> ) }

Aquí hay una demostración .

Asegúrese de ejecutar en Android/ios ya que no funciona en la web

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda