Tutorials. Short, practical guides on Tailwind CSS, Astro, Alpine.js, and JavaScript.

All tutorials

How to create a simple copy to clipboard component with Tailwind CSS and Alpine.js

Build an interactive copy-to-clipboard utility that lets users edit the text, preview the result, and get instant feedback, all with Alpine.js reactivity and Tailwind CSS styling.

How to create a product details page with Tailwind CSS and Alpine.js

Build a complete ecommerce product page with image gallery, tabs, color/size selectors, and reviews using Alpine.js and Tailwind CSS.

How to Create an Image Carousel with Slide Number Counter Using Tailwind CSS and Alpine.js

Build an interactive image carousel with slide number counter using Alpine.js and Tailwind CSS. Learn how to create smooth transitions, navigate between images, and display slide indicators—perfect for portfolios, galleries, and hero sections.

How to Create an interactive color-shifting hover card with Tailwind CSS and JavaScript

How to create a bubble animation with Tailwind CSS and JavaScript

How to create a dynamic multiple step form with Tailwind CSS and Alpine JS

How to create a typography component with variants with Astro JS and Tailwind CSS

How to create a masonry grid layout with Tailwind CSS and JavaScript

How to create a particle text effect with Tailwind CSS and JavaScript

How to create a circular menu with Tailwind CSS and JavaScript

How to create a confetti animation effect with Tailwind CSS and JavaScript

Build a confetti animation with Tailwind CSS and JavaScript using a canvas and a small Confetti class. Trigger it on a button click to celebrate user actions.

How to create a typewriter effect text animation with Tailwind CSS and JavaScript

Build a simple typewriter text animation with Tailwind CSS and JavaScript: a small function types out a sentence character by character with setTimeout.

How to create a button component with variants and icons with Astro JS and Tailwind CSS

Build a reusable Astro button component with size and color variants, optional icons and class:list, styled with Tailwind CSS. Props and rest props explained.

How to build a custom video player with Tailwind CSS and JavaScript

How to create a virtual keyboard with Tailwind CSS and JavaScript

How to build a lazy-loading image gallery with Tailwind CSS and JavaScript

Build a lazy-loading image gallery with Tailwind CSS and JavaScript: images are created and loaded with IntersectionObserver as they enter the viewport.

How to create a music visualizer with Tailwind CSS and JavaScript

Build a music visualizer with Tailwind CSS and JavaScript using the Web Audio API and canvas: bars that react to an audio file in real time.

How to create a basic Kanban board with Tailwind CSS and JavaScript

How to create a combo box with Tailwind CSS and Javascript

How to create a basic drawing tool and save to PNG with Tailwind CSS and JavaScript

How to create a skeleton loading screen with Tailwind CSS and Javascript

How to create an image comparison slider with Tailwind CSS and JavaScript

Build a before and after image comparison slider with Tailwind CSS and JavaScript: a draggable handle reveals the second image with clip-path.

How to create a password strength meter with Tailwind CSS: JavaScript and Alpine.js

Build a password strength meter with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Live strength checks, a colored bar, and a visibility toggle.

How to create persistent tabs with Tailwind CSS: JavaScript and Alpine.js

Build accessible tabs with Tailwind CSS that remember the active tab in localStorage, two ways: vanilla JavaScript or Alpine.js.

How to create infinite scrolling with Tailwind CSS and JavaScript

How to create interactive and accessible content with the details element

How to create a JavaScript-Free animated accordion FAQ section with only Tailwind CSS

How to create a JavaScript-Free dismissible notification with only Tailwind CSS

How to create a JavaScript-free modal popup with only Tailwind CSS

Build a modal popup with only Tailwind CSS and a hidden checkbox, no JavaScript: peer-checked utilities toggle the overlay and dialog.

How to create a flyout menu with submenu using only Tailwind CSS

How to create a responsive bento grid with Tailwind CSS

Build a responsive bento grid layout with Tailwind CSS using grid, col-span and row-span utilities. Every box explained, full markup included.

How to keep your footer at the bottom of the page with Tailwind CSS

Keep the footer at the bottom of the page with Tailwind CSS using flex, min-h-screen and mt-auto, even when the page has little content.

How to create a calendar layout with Tailwind CSS

How to create a responsive multi-column layout with Tailwind CSS

Build a responsive three-column layout with Tailwind CSS: sidebar, main column and aside that stack on mobile using flex and grid utilities.

How to create a responsive table with Tailwind CSS

Build a responsive table with Tailwind CSS that scrolls horizontally on small screens instead of breaking the layout. Markup, overflow wrapper and cell styling explained.

How to create an animated avatar stack widget with Tailwind CSS

How to create a ribbon for a pricing card with Tailwind CSS

How to create a bottom navigation with Tailwind CSS

How to create an animated expanding search bar with Tailwind CSS

Build an expanding search bar with Tailwind CSS only: the input grows on focus with transition utilities, no JavaScript needed.

How to create an animated background gradient with Tailwind CSS

Create an animated background gradient with Tailwind CSS only: layered gradients, blur and keyframe animation, no JavaScript. Copy-paste markup included.

How to a create a color picker with Tailwind CSS and JavaScript

How to create an animated toggle with Tailwind CSS

How to create an animated input field with Tailwind CSS

Build an animated input field with a floating label using only Tailwind CSS peer and focus utilities. No JavaScript, full markup included.

How to create an animated profile card with Tailwind CSS

How to create an animated envelope with Tailwind CSS

Build an animated envelope that opens on hover with only Tailwind CSS: flaps, letter and stamp made with clip-path, transforms and transitions, no JavaScript.

How to create aloader with Tailwind CSS

How to create a card with animated background with Tailwind CSS

How to create a search input with Tailwind CSS: JavaScript and Alpine.js

Build a live search input with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Filter a list of items as the user types, no extra libraries.

How to create a bottom drawer with Tailwind CSS: JavaScript and Alpine.js

Build a bottom drawer that slides up from the bottom of the screen with Tailwind CSS, two ways: vanilla JavaScript class toggling or Alpine.js transitions.

How to create an image gallery with Tailwind CSS: JavaScript and Alpine.js

Build an image gallery with a lightbox modal using Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Click a thumbnail to open, press Escape to close.

How to create a progress bar with Tailwind CSS: JavaScript and Alpine.js

Build an animated progress bar with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. A timer fills the bar to 100% with a live percentage label.

How to create a scroll to top button with Tailwind CSS: JavaScript and Alpine.js

Build a scroll to top button with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. It fades in after you scroll and smoothly returns to the top.

How to create a tag input with Tailwind CSS: JavaScript and Alpine.js

Build a tag input with Tailwind CSS where Enter adds a removable tag chip, two ways: vanilla JavaScript or Alpine.js with x-model and x-for.

How to create a tooltip with Tailwind CSS: JavaScript and Alpine.js

Build a hover tooltip with Tailwind CSS, two ways: vanilla JavaScript with mouse events or Alpine.js with x-data and x-show.

How to create a dismissible cookie banner with Tailwind CSS: JavaScript and Alpine.js

Build an accessible, dismissible cookie banner with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js, with focus management for keyboard users.

How to create a carousel with Tailwind CSS: JavaScript and Alpine.js

Build an accessible carousel with previous and next buttons using Tailwind CSS, two ways: vanilla JavaScript smooth scrolling or Alpine.js state in x-data.

How to create a flyout menu with Tailwind CSS: JavaScript and Alpine.js

Build a flyout menu (a dropdown) with Tailwind CSS, two ways: vanilla JavaScript class toggling or Alpine.js with x-show and smooth transitions.

How to create a chat bubble with Tailwind CSS: JavaScript and Alpine.js

Build a chat bubble that toggles from a floating button with Tailwind CSS, two ways: vanilla JavaScript class toggling or Alpine.js transitions.

How to add items to your cart with Tailwind CSS: JavaScript and Alpine.js

Build an add to cart component with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Add items, manage quantities, and watch the total update.

How to animate objects on scroll with Tailwind CSS: JavaScript and Alpine.js

Animate images as they scroll into view with Tailwind CSS and the Intersection Observer API, two ways: vanilla JavaScript or the Alpine.js Intersect plugin.

How to create a swatch clock with Tailwind CSS

How to create a rating system with Tailwind CSS: JavaScript and Alpine.js

Build a five-star rating system with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Click to rate, click again to clear, with a live label.

How to create a login/register form with Tailwind CSS: JavaScript and Alpine.js

Build a login form with client-side validation using Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Email check, password rules, show/hide toggle.

How to create a pricing slider with Tailwind CSS: JavaScript and Alpine.js

Build a pricing slider with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Drag to pick pageviews and the price updates instantly.

How to create a countdown with Tailwind CSS: JavaScript and Alpine.js

Build a countdown timer with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Days, hours, minutes and seconds ticking down to your end date.

How to create an expandable image gallery with Tailwind CSS

How to create a grid toggle with Tailwind CSS: JavaScript and Alpine.js

Build a grid layout toggle with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. One button switches the container between two and four columns.

How to create a drag and drop with Tailwind CSS and JavaScript

Build a drag and drop list with Tailwind CSS and Sortable.js: reorder items between columns with a few lines of JavaScript.

How to create vertical tabs with Tailwind CSS and JavaScript

Build vertical tabs with Tailwind CSS and JavaScript: a side list of buttons that shows and hides content panels by toggling the hidden class.

How to create a dark mode toggle with Tailwind CSS: JavaScript and Alpine.js

Build a dark mode toggle with Tailwind's dark variant, two ways: a few lines of vanilla JavaScript or an Alpine.js x-data binding.

How to create a TODO with Tailwind CSS: JavaScript and Alpine.js

Build a TODO app with Tailwind CSS that saves tasks to localStorage, two ways: vanilla JavaScript or Alpine.js with x-data and x-for.

How to change background color on scroll with Tailwind CSS: JavaScript and Alpine.js

Change the header and section background colors on scroll with Tailwind CSS, two ways: a vanilla JavaScript scroll listener or Alpine.js with @scroll.window.

How to create an interactive testimonial with Astro and Tailwind CSS: JavaScript and Alpine.js

Build an interactive testimonial slider with Astro and Tailwind CSS, two ways: vanilla JavaScript or Alpine.js, switching quotes with avatar buttons.

How to create a sidebar navigation with Tailwind CSS: JavaScript and Alpine.js

Build a sidebar navigation with Tailwind CSS, two ways: vanilla JavaScript with a backdrop and Escape key, or Alpine.js with sliding transitions.

How to create a multistep form with Tailwind CSS: JavaScript and Alpine.js

Build a multistep form wizard with Tailwind CSS, two ways: vanilla JavaScript or Alpine.js. Step navigation, saved form data, and a confirmation step.

How to create an accordion with Tailwind CSS: JavaScript and Alpine.js

Build an expand-and-collapse accordion with Tailwind CSS, two ways: vanilla JavaScript with class toggles or Alpine.js with x-show.

How to create an animated navigation on scroll with Tailwind CSS and JavaScript

Change the navigation bar background and add a blur on scroll with Tailwind CSS and vanilla JavaScript using a scroll listener and classList toggles.

How to create an interactive pricing table with Tailwind CSS and JavaScript

How to a create a scroll progress bar with Tailwind CSS and Javascript

How to create a 3D Button Tailwind CSS

How to creat a contextual menu with Tailwind CSS and Alpinejs

How to create a set of tabs with Tailwind CSS and Alpinejs

Build a tab component with Tailwind CSS and Alpine.js: active tab state with x-data, panels with x-show and accessible tab buttons.

How to simplify your code and avoid repeating your markup with Astrojs and Tailwind CSS

How to create animated blog cards with Astrojs and Tailwind CSS

How to create and print an invoice with Astrojs and Tailwind CSS

How to create a multi column layout Tailwind CSS

How to create an animated log in modal with Tailwind CSS and Alpine.js

Build an animated login modal with Tailwind CSS and Alpine.js: slide-up transition, overlay, focus handling and x-data state explained step by step.

How to create a sticky changelog component with Tailwind CSS

How to create a dynamic feature grid with Astrojs and Tailwind CSS

How to create an adaptable navigation on scroll with Astro, Tailwind CSS, and Alpine.js

How to create an interactive pricing table with Astro, Tailwind CSS, and Alpine.js

How to create animated image cards with Tailwind CSS and Astrojs