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

157
Vistas
Combine an uploaded image and a draggable text and download it together in react

I am new to react and js. Is there any way that I can upload an image and move the draggable text on top of that image and when I click download the image along with the download get saved?? Any help is much appreciated.

My App.js

import './App.css';
import Land from './Land';
import React from 'react';
import Draggable from 'react-draggable';
import { saveAs } from 'file-saver'


function App() {

  const [file, setFile] = React.useState();
  function handleChange(e) {
      console.log(e.target.files);
      setFile(URL.createObjectURL(e.target.files[0]));
  }

    const downloadImage = () => {
      saveAs(file, 'image.jpg') // Put your image url here.
    }



  return (
      <div className="App">
          <h2>Add Image:</h2>
          <input type="file" onChange={handleChange} />

          
          <div className='img-container'>

           <Land/>
          <img src={file} width ="100%"/>

          <button onClick={downloadImage}>Download!</button>
          </div>

      </div>

  );

}

export default App;

My Land.js

import React from 'react';
import Navbar from './Navbar';
import Hero from './Hero';
import pic from './me.png'

import Draggable from 'react-draggable';
export default function Land()
{
    return(
        <div>
            
            <Draggable>
      <div>I can now be moved around!</div>
    </Draggable>
        </div>
    )
}

Screenshot of landing page

about 4 years ago · Juan Pablo Isaza
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