Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!