Alpine.ui
Alpine.js

Component Showcase

Every major UI pattern built with Alpine.js + Tailwind CSS. All interactive, all in one file. Works on GitHub Pages out of the box.

01

Modals

Basic

Simple open/close with backdrop click to dismiss.

Basic Modal

Click outside the modal or the close button to dismiss. Alpine handles the transition automatically with x-transition.

Confirm

Destructive action confirmation dialog.

โœ“ Item deleted!

๐Ÿ—‘๏ธ

Delete this item?

This action cannot be undone.

Form

Modal with reactive form and validation state.

โœ“ Submitted:

Contact Form

Preview

Lightbox-style image or content preview modal.

๐Ÿ–ผ๏ธ
Preview Image
Replace this with an actual <img> tag for a real lightbox.
Drawer

Slides in from the right like a side panel.

Side Drawer

This is a side drawer panel. It slides in from the right using x-transition with translate classes.

Setting 1
Setting 2
Setting 3
Alert

Status alert modals โ€” success, error, warning.

// Basic modal pattern with x-data
<div x-data="{ open: false }">
  <button @click="open = true">Open</button>
  <div x-show="open" x-transition @click.self="open = false">...</div>
</div>
03

Accordion

Single open (FAQ)
Multi open
04

Tabs

Underline Style
๐Ÿ‘๏ธ This is the Preview panel. See the rendered component here.
<div x-data="{ tab: 'a' }">
  <button @click="tab='a'">Tab A</button>
  <div x-show="tab==='a'">...</div>
</div>
๐Ÿ“š Tabs use x-show to toggle panels and :class for active styling.
Pill Style
panel content. Each tab switches the view reactively with Alpine's x-show.
06

Notifications

Toast System

Notifications appear in the top-right corner. They stack and auto-dismiss.

07

Radio Group

Card Style

Selected:

Button Group
Size
Color
Preview:
08

Toggle / Switch

Settings Toggles
Animated Toggle
Click to toggle (with loading state)
09

Tooltip

CSS + Alpine

Hover over the buttons to see tooltips. Built with CSS data-tip attribute and Alpine x-show.

Alpine x-show tooltip
10

Form Binding (x-model)

โœ“ Looks good Required

โœ“ Valid email Must include @

11

Transitions & Animations

Fade
Fade transition โœจ
Scale + Fade
Scale + Fade ๐ŸŽฏ
Slide Down
Slides down โฌ‡๏ธ
x-effect

Reactively runs a side-effect when data changes.

$watch

Watch data and react to changes.

UPPERCASE:
x-for + x-ref

Dynamic list with $refs usage.

12

Global Store (Alpine.store)

Cart Store

Shared state across separate components using Alpine.store.

Cart Summary

This component reads from the same store โ€” no props needed.

๐Ÿ›’ Cart is empty
Total ( items)