Open Source

Beautiful Modals
with AnyBox.js

A lightweight, zero-dependency JavaScript library for creating elegant lightboxes and alert dialogs with smooth animations.

View on GitHub

Everything you need

Built for simplicity and performance. No jQuery, no bloat.

Zero Dependencies

Pure vanilla JavaScript. No frameworks, no extra packages to install.

🎬

10 Open Animations

Center, left, right, top, bottom, opacity, flip, rotate, bounce, elastic.

🖼️

7 Image Transitions

Fade, slide, zoomIn, zoomOut, flipX, flipY for smooth gallery navigation.

📱

Mobile Friendly

Touch swipe support and responsive design for all screen sizes.

⌨️

Keyboard Navigation

Arrow keys for gallery navigation and Escape to close modals.

🎨

Fully Customizable

Colors, sizes, positions, buttons - everything is configurable.

10 animation types

Each card opens an alertbox with a different open animation. Click to try them all.

Status dialogs

Animated alert boxes for success, error, and warning states. Supports light and dark themes.

Theme

Success

Operation completed successfully with animated feedback.

Error

Something went wrong. Display errors with a clear visual cue.

Warning

Heads up! Show warnings before critical actions.

Smart tooltips

Hover over elements to see auto-positioned tooltips. They flip automatically to stay in the viewport.

⬆️ Top
⬇️ Bottom
⬅️ Left
➡️ Right

Toast notifications

Stackable notifications with progress bar, pause-on-hover, and multiple positions.

Position
Animation

Success

Show a success toast notification.

Error

Show an error toast notification.

Warning

Show a warning toast notification.

Up and running in seconds

Simple API, powerful results.

// Lightbox with image transitions
let lightbox = new Anybox("lightbox", {
    animation: { type: "bounce", duration: 700 },
    imageTransition: "slide",
    imageTransitionDuration: 350,
    slider: { buttonColor: "#fff", information: true },
    closeButton: { fill: "#fff", size: 22 }
})

// Alertbox with custom animation
let alert = new Anybox("alertbox", {
    headline: { text: "Done!", level: 3 },
    message: { text: "Your action was successful." },
    buttons: true,
    closeButton: { fill: "#333" }
})

// Show with different animations
alert.show("success", { type: "bounce", duration: 700 })
alert.show("fail", { type: "elastic", duration: 800 })