whatisgithub

What is vex?

hubspot/vex — explained in plain English

Analysis updated 2026-06-24

6,887CSSAudience · developerComplexity · 1/5Setup · easy

In one sentence

A tiny JavaScript library that replaces the browser's plain built-in alert, confirm, and prompt dialog boxes with fully styleable, mobile-friendly popups that you control completely with CSS.

Mindmap

mindmap
  root((vex))
    What it does
      Styleable dialogs
      Alert confirm prompt
      Mobile friendly
    Features
      Multiple open at once
      Smooth animations
      CSS theming
      Plugin system
    Integration
      Script tag include
      UMD module support
    Use Cases
      Delete confirmations
      User input prompts
      Branded popups
    Audience
      Frontend developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace browser alert and confirm dialogs with styled, animated popups that match your site's design without touching JavaScript logic.

USE CASE 2

Show multiple dialog boxes at the same time and let users dismiss them individually or all at once.

USE CASE 3

Build a custom confirmation dialog for a delete action that looks consistent across desktop and mobile browsers.

USE CASE 4

Add a styled text-input prompt to collect a value from the user, replacing the browser default that cannot be styled.

What is it built with?

JavaScriptCSS

How does it compare?

hubspot/vexlukehaas/css-loaderserikflowers/weather-icons
Stars6,8877,0607,123
LanguageCSSCSSCSS
Setup difficultyeasyeasyeasy
Complexity1/51/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Include the Vex script and a theme CSS file, no build tools or dependencies required for basic use.

Open-source library released by HubSpot, specific license terms are covered in the repository.

So what is it?

Vex is a small JavaScript library created by HubSpot for showing dialog boxes in web applications. A dialog box is the popup window that appears when a site needs to ask the user a question, confirm an action, or prompt them to type something. Browsers have built-in versions of these (alert, confirm, and prompt), but they look plain and cannot be styled. Vex is a drop-in replacement that gives developers full control over how these dialogs look and behave. The library weighs about 5.6 kilobytes after compression, has no external dependencies, and works on mobile devices as well as desktop browsers. Multiple dialogs can be open at the same time, and they can be closed individually or all at once. Transitions and animations are configurable and described in the README as smooth. The styling is handled through CSS, so matching a site's existing visual design is a matter of writing or overriding CSS rules rather than modifying JavaScript. Vex supports UMD, which means it can be loaded through various module systems or included directly in a page with a script tag. A plugin system allows additional behavior to be added on top of the core functionality. The repository's README is brief and links out to a demo page and full documentation for setup instructions and the complete API. The project is open-source and was released by HubSpot as part of their open-source program.

Copy-paste prompts

Prompt 1
Replace all confirm dialogs in my web app with Vex dialogs that match my brand colors. Show me how to load Vex via a script tag, apply a custom CSS theme, and call vex.dialog.confirm.
Prompt 2
My app needs to show a delete confirmation popup. Write the Vex dialog code that shows a styled warning message with Confirm and Cancel buttons, and runs a function only when the user confirms.
Prompt 3
Show me how to open two Vex dialogs stacked on top of each other and close them independently without closing both at once.
Prompt 4
I want to collect user input with a Vex prompt dialog and validate the text before closing. Show me how to intercept the submit button and keep the dialog open if validation fails.
Prompt 5
How do I load Vex through a UMD module system in a Webpack project and add a plugin to the core instance?

Frequently asked questions

What is vex?

A tiny JavaScript library that replaces the browser's plain built-in alert, confirm, and prompt dialog boxes with fully styleable, mobile-friendly popups that you control completely with CSS.

What language is vex written in?

Mainly CSS. The stack also includes JavaScript, CSS.

What license does vex use?

Open-source library released by HubSpot, specific license terms are covered in the repository.

How hard is vex to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is vex for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.