High performant, highly customizable ASCII backgrounds. Built for my personal portfolio and my first launched product:
Krentenweger.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
·
npm
Table of Contents
Install via npm:
npm install ascii-blobsIt works with both React and vanilla JavaScript.
import { useRef } from "react";
import { AsciiBlobs, getThemeClassName } from "ascii-blobs";
import type { AsciiBlobsRef } from "ascii-blobs";
export function Hero() {
const blobsRef = useRef<AsciiBlobsRef | null>(null);
return (
<section style={{ position: "relative", minHeight: "420px" }}>
<AsciiBlobs
ref={blobsRef}
className={getThemeClassName("dracula")}
style={{ position: "absolute", inset: 0, zIndex: -1 }}
colors={{ primary: "#BD93F9" }}
blobBehavior={{ count: 10 }}
/>
</section>
);
}import { AsciiBlobs, getThemeClassName } from "ascii-blobs/vanilla";
const stage = document.querySelector("#stage");
const blobs = new AsciiBlobs(stage, {
className: getThemeClassName("nord"),
style: { position: "absolute", inset: "0" },
colors: { primary: "#88C0D0" },
blobBehavior: { count: 6, maxRadius: 180 },
animation: { frameInterval: 42 },
});For full details, check the Documentation
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT license. See LICENSE for more information.
Daan Hessen - daanh2002@gmail.com
Project Link: https://github.com/DaanHessen/ASCII-blobs
