Ascii Butterflies

A few butterflies drawn as ASCII glyphs, flapping on wandering paths and landing now and then.

Interaction Type

Butterflies drift slowly from one side of their container to the other, beating their wings up and down and turning to face where they go. They never leave the container. Now and then one lands and slowly opens and closes its wings. Move the pointer near one and it flits away. Click to scatter the ones close by. Honors prefers-reduced-motion.

Installation

npx shadcn@latest add ikislay/pixel-ui/ascii-butterflies

How to use

import { AsciiButterflies } from "@/components/ui/ascii-butterflies"
export function Demo() {
return <AsciiButterflies variant="color" className="h-96 w-full rounded-2xl" />
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
variant
colormono

Color mixes blue, teal, pink, yellow and orange wings. Mono uses greys only. Both follow your light or dark theme.

count
number

How many butterflies fly at once. Keep it small so the scene stays calm.

Keep in mind

Most components here are recreations of great work from around the web. I don't claim to be the original creator - this is my attempt to reverse-engineer, replicate, and often add a few extra features. I've tried to credit everyone; if I missed someone, let me know.

Credits

  • •Inspired by stackedlol/ascii-sharks

Contact

Found a bug or issue? Feel free to drop a DM.

License & Usage

  • •MIT with the Commons Clause and an attribution requirement. Free to use, modify and ship in personal and commercial projects, closed source included. You own the code once it is in your project.
  • •Credit is required. Any project shipping a Pixel UI component must credit Pixel UI with a visible link back to pixelui.dev, in a footer, an about page, a credits screen or a README.
  • •Don't strip the credit or the copyright notice from the source you copied.
  • •Don't sell, sublicense or redistribute the components themselves, on their own, bundled into a template, kit, theme or paid course, or ported to another framework.
  • •Don't republish them. No mirrors, no re-uploads, no listing them as your own work.
  • •Don't repackage the registry as a competing component library.
  • •Don't claim authorship of a component or of Pixel UI itself.
  • •The LICENSE file in the repository is the full text and governs. Ask first if your use doesn't fit these rules.
Ascii Butterflies

What should we build today?

/explore ideas/refine my writing/plan a project