Skip to content

About

A library I created for my developer portfolio.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


ASCII-blobs

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

screenshot of portfolio using ASCII-blobs

Built With

  • TypeScript
  • React
  • Vite

(back to top)

Getting Started

Prerequisites

Install via npm:

npm install ascii-blobs

(back to top)

Usage

It works with both React and vanilla JavaScript.

React

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>
  );
}

Vanilla JavaScript

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

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

License

Distributed under the MIT license. See LICENSE for more information.

Contact

Daan Hessen - daanh2002@gmail.com

Project Link: https://github.com/DaanHessen/ASCII-blobs

(back to top)

About

A library I created for my developer portfolio.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages