0.1.4 • Published 2 months ago

texpanse v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Texpanse

Texpanse is a modern acronym that highlights titles or keywords its changes per 3 sec specific text colors per letter and randomly characters upper case to lowercase.

If you using 'Next.js' then use this "use client" at the top

Texpanse demo

Installation NPM Texpanse

npm i texpanse
import { useCaseConverter } from 'texpanse';

const Demo = () => {
   const originalString = "Bangladesh";
   const colors = ['text-blue-500', 'text-purple-500', 'text-yellow-500'];
   
   const { convertedString, colorClasses } = useCaseConverter(originalString, colors);
   const renderConvertedString = (convertedString, colorClasses) => {
   const colorClassesArray = colorClasses.trim().split(' ');
      return convertedString.split('').map((char, index) => (
         <span key={index} className={colorClassesArray[index % colorClassesArray.length]}>{char}</span>
      ));
   };
  return (
     <div>
        <h1> {renderConvertedString(convertedString, colorClasses)} </h1>
    </div>
  )
}
export default Demo;
0.1.4

2 months ago

0.1.3

2 months ago

0.1.2

2 months ago

0.0.1

2 months ago

1.0.0

2 months ago