Skip to content

a website made in react-tailwind and is used to manipulate our text

Notifications You must be signed in to change notification settings

codewithsonyy/TextUtils

Repository files navigation

Textutils | live link

It is one page based react-tailwind project or website in which we can Analyze text different ways.

static site without router and different theme is live on Gh-page

Features

  • Router to move bw pages
  • toggle theme
  • responsive
  • Cross platform
  • save text as pdf
  • Alert on doing a task

function to download as pdf

 const handlePdfClick = () => {
    const input = document.querySelector("#myBox");
    html2canvas(input, { scale: 2, quality: 4 }).then((canvas) => {
      const imgData = canvas.toDataURL("image/png");
      const pdf = new jsPDF({
        orientation: "landscape",
      });
      const imgProps = pdf.getImageProperties(imgData);
      const pdfWidth = pdf.internal.pageSize.getWidth();
      const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width;
      pdf.addImage(imgData, "PNG", 0, 0, pdfWidth, pdfHeight);
      pdf.save("download.pdf");
    });
  };

light theme

App Screenshot

night mode

using useEffect and dark class of tailwind

App Screenshot

button theme change

using useState hook

App Screenshot