Aquarium Prompt
An AI prompt box floating in a canvas pixel-art aquarium with schooling boids fish, interactive ripples, and rising thought bubbles.
Live preview
Interact with the effect here. Drag, hover, and use its controls.
What's on your mind?
Move through the water, or tap it.
Variation Tweaking
Adjust the options and see the preview update live.
Installation
Install automatically via CLI or manually integrate dependencies and code.
Usage
Import the component and configure visual variants, sizes, and operational states.
import { AquariumPrompt } from '@/components/interactions/aquarium-prompt' <AquariumPrompt title="What's on your mind?" placeholder="Ask anything" onSubmit={(text) => console.log(text)}/>Composition
Compose with icons, form triggers, and layout containers.
<div className="flex w-full items-center justify-center p-4"> <AquariumPrompt title="Explore underwater AI" placeholder="Type to attract fish..." fish={26} autoplay={false} onSubmit={(query) => console.log(query)} /></div>API Reference
Property matrix, types, defaults, and usage descriptions.
Data Attributes
State-reflecting DOM attributes for custom selector styling.
This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.
How It Works
Renders a crisp pixel-art aquarium on a 4x downscaled HTML5 canvas. Fish follow a modified Craig Reynolds Boids algorithm (separation, alignment, cohesion) schooling with their species (clownfish, blue tang, yellow tang, sardines). The fish steer away from pointer coordinates, react to water ripples, and gather around the active typing caret. When a message is sent, the fish swarm inward to "gulp" the text, which floats away as an animated bubble.
Accessibility
A fully accessible form input with label association, keyboard Enter submission, and WCAG compliant focus ring styling.
Limitations
Features
Meet the team behind the interaction
Crafted for modern web applications and AI agent workflows.
