UI Components snippets

CSS UI component snippets: buttons, forms, navigation, cards, tooltips, and more. Every snippet includes a live demo, copyable CSS, and an LLM-ready prompt.

Widely supported

3D Press Button

Button with 3D pressed effect on click using box-shadow and translateY with no JavaScript.

no-js
Widely supported

404 page

404 page snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

500 error page

500 error page snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

CSS accordion

details/summary styled accordion, no JS.

no-js
Widely supported

Action list

Action list snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Activity feed

Activity feed snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Animated button

Button with multi-stage hover animation: background sweep, icon shift, and shadow lift. Pure CSS transitions, no JavaScript.

animation
Widely supported

ARIA Attribute Styling

Style elements based on ARIA attributes using CSS attribute selectors — disabled, expanded, selected states without extra classes.

no-js
Widely supported

Avatar stack

Overlapping circular avatars using negative margins and z-index stacking.

layout
Widely supported

Avatar

Style user avatars with CSS border-radius, object-fit, and size variants for profile pictures and user icons.

no-js
Widely supported

Badge/status indicator

Small colored badge dots and status indicators for online, away, busy, and offline states. Semantic, accessible, oklch-powered.

no-js
Widely supported

Basic card

A versatile card component with image, title, description, and hover lift effect. The foundation of any card-based UI.

no-js
Widely supported

Blog post card

A CSS blog post card with gradient image placeholder, meta line, title, excerpt, and read-more link. Pure CSS, no JavaScript.

no-jslayout
Widely supported

Breadcrumb trail

Breadcrumb trail snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Breadcrumb navigation

A breadcrumb navigation with CSS flexbox and pseudo-element separators.

layout
Widely supported

Button Group

A horizontal group of connected buttons sharing borders — built with flexbox and border-radius overrides.

no-js
Widely supported

Button with badge

A button with a notification badge count positioned top-right using CSS absolute positioning. No JavaScript required.

no-js
Widely supported

Chip/tag

Compact chip/tag component with optional close button. Ideal for filters, categories, and selected items.

no-js
Widely supported

Coming soon page

Coming soon page snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

CSS-only toggle

Checkbox-driven toggle switch with no JavaScript.

no-js
Widely supported

Custom checkbox

A styled checkbox using appearance: none with custom check mark, smooth transition, and accessible focus ring.

no-js
Widely supported

Custom radio

Custom-styled radio buttons with animated selection dot. Uses appearance: none and pseudo-elements, fully keyboard-accessible.

no-js
Widely supported

data-* Toggle Styling

Style elements by their data-* attribute values using CSS — tabs, toggles, and state machines without JavaScript classes.

no-js
Widely supported

Decorative border

Create a decorative multi-layer border using outline + outline-offset and box-shadow to add visual depth to cards and buttons without extra markup.

no-js
Widely supported

Destructive Button

A danger/destructive action button in red oklch() tones — for delete, remove, or irreversible actions.

no-js
Widely supported

Dialog modal

A native HTML dialog element with styled backdrop, centered content, and smooth open animation. Accessible by default.

Widely supported

Disabled button

CSS for disabled button states using :disabled and aria-disabled. Reduced opacity, cursor: not-allowed, and no hover effects. Accessible by default.

no-jsa11y
Widely supported

Double border

Create double border effects on cards and containers using outline-offset, box-shadow, or border-style: double.

no-js
Widely supported

Download card

A file download card with icon, filename, size, tags, and a primary download button. Use it for releases, assets, and resources pages.

no-js
Widely supported

Dropdown menu

A CSS dropdown menu using :hover and :focus-within. Smooth reveal animation, keyboard accessible, no JavaScript required.

no-js
Widely supported

Empty inbox

Empty inbox snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Event card

Event card snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Expandable card

Card that expands to reveal additional content using the details/summary HTML elements. Smooth height transition, no JavaScript.

no-js
Widely supported

External Link Icon

Auto-append an external link icon to any anchor with href starting with http using CSS attribute selectors — no JavaScript required.

no-js
Experimental

Fallback UI pattern

Use @supports to progressively enhance components — show a solid fallback for older browsers while unlocking advanced CSS features for modern ones.

no-jsprogressive-enhancement
Widely supported

Feature card

A CSS feature card grid with icon, heading, and description. Three columns, card backgrounds, border-radius, and padding. Copy and go.

no-jslayout
Widely supported

File upload

A styled file upload dropzone with dashed border, hover accent, and hidden input. Built with a label wrapping a hidden file input — no JavaScript.

no-js
Widely supported

Floating Action Button

Circular FAB with position:fixed, drop shadow, and hover scale effect.

no-js
Widely supported

Floating label

A CSS floating label input that animates from placeholder position to the top-left on focus or when filled. No JavaScript.

no-js
Widely supported

Focus ring

Style accessible focus rings using :focus-visible, outline-offset, and oklch() for keyboard navigation indicators.

no-js
Widely supported

Ghost button

A transparent button with border outline that fills on hover. All states covered: hover, focus-visible, active, disabled.

no-js
Widely supported

Gradient Button

Button with CSS gradient background using oklch() colors, with smooth hover shift.

colorno-js
Widely supported

Hamburger menu

CSS-only hamburger toggle that morphs into an X. Three bars animate to a close icon using transforms, no JavaScript required.

no-js
Widely supported

:has() dropdown

Style a parent when a child is open using :has().

no-js
Widely supported

Horizontal Card

Card layout where image/media sits on the left and content on the right using CSS Grid.

layoutno-js
Widely supported

Icon button

A square button with a centered icon. Accessible with aria-label, complete state coverage, keyboard-friendly.

no-js
Widely supported

Icon-only button

Accessible icon-only button with visible focus ring, tooltip on hover, and proper ARIA labeling. Pure CSS, no JavaScript.

no-js
Widely supported

Image card

Build responsive image cards with CSS grid, aspect-ratio, and object-fit for consistent media display.

no-js
Widely supported

Image overlay card

A card with a gradient overlay on an image — title and text overlaid at the bottom using CSS absolute positioning. No JavaScript required.

no-jslayout
Widely supported

Styled text input

A polished text input with focus-visible state, placeholder, and oklch colors.

Widely supported

Interactive card (click area)

Make entire cards clickable using CSS ::after pseudo-element stretching with accessible link semantics.

no-js
Widely supported

Job listing card

Job listing card snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Key-value list

Key-value list snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Language-based styling

Use the :lang() pseudo-class to adapt typography, quotes, and direction per language. Pure CSS internationalization. Copy and go.

no-jstypography
Widely supported

Large button

A large button style with generous padding and bigger font-size for hero sections and primary calls-to-action. Copy-ready CSS.

no-js
Widely supported

Loading Button

A button with a CSS spinner that appears during loading state, using animation and pseudo-elements only.

no-js
Widely supported

Maintenance page

Maintenance page snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Meter

Meter snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Native select

A fully styled native <select> element with appearance: none, custom SVG arrow, oklch border, and keyboard focus ring. No JavaScript.

no-js
Widely supported

No connection

No connection snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

No results

No results snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Notched corner

Cut notched corners on UI elements using CSS clip-path polygon for a modern geometric look.

no-js
Widely supported

Notification card

Notification card snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Notification list

Notification list snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Outline Button

Ghost/outline button with visible border and transparent background, with hover fill effect.

no-js
Widely supported

outline-offset focus ring

A focus ring with a visible gap between the element and the ring, using outline combined with outline-offset for clean keyboard navigation styling.

no-js
Widely supported

Overflow Scroll Container

A scrollable container with overflow: auto, custom scrollbar styling, and scroll-shadow fade edges.

layoutno-js
Widely supported

Pill Button

Button with fully rounded corners (border-radius: 9999px) in various sizes and styles.

no-js
Widely supported

Pill shape

Create pill-shaped UI elements like tags and badges using border-radius: 9999px for perfectly rounded ends.

no-js
New

Popover

Native HTML popover with CSS styling — positioned tooltip-style content that dismisses on outside click. No JavaScript needed.

no-js
Widely supported

Pricing card

A pricing tier card with a highlighted popular option using scale transform and oklch accent colors.

Widely supported

Primary button

Production-ready primary button with hover, focus, active, and disabled states.

Widely supported

Product card

E-commerce product card with image, title, price, rating stars, and add-to-cart button. Responsive, accessible, pure CSS layout.

no-js
Widely supported

Profile card

A centered profile card with circular avatar, name, role, and social links row. Pure CSS, dark-mode ready.

no-js
Widely supported

Progress bar

A styled progress element with animated fill using pseudo-elements and an accent-color fallback.

animation
Widely supported

Range slider

A styled CSS range input with custom track and thumb. Uses appearance: none with webkit and moz vendor prefixes. No JavaScript.

no-js
Widely supported

Recipe card

Recipe card snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Rounded corners

Apply consistent rounded corners to UI elements using border-radius with CSS custom properties.

no-js
Widely supported

Search input

A styled search input with magnifying glass icon and animated focus ring. Clean, accessible, dark-mode ready.

no-js
Widely supported

Secondary Button

Secondary button style with subtle background and muted text, the perfect complement to a primary CTA.

no-js
Widely supported

Section separator/divider

Style section dividers and separators using CSS borders, pseudo-elements, and oklch() accent colors.

no-js
Widely supported

Shimmer/skeleton

Skeleton loading placeholder with animated shimmer gradient. Shows content shape while data loads, pure CSS animation.

animation
Widely supported

Skeleton card

Build loading skeleton placeholder cards with CSS shimmer animation using linear-gradient and keyframes.

animationno-js
Widely supported

Small button

A compact small button style with reduced padding and font-size. Copy-ready CSS for primary, secondary, and ghost variants at a smaller scale.

no-js
Widely supported

Split Button

A split button with a primary action and a dropdown arrow — two clickable zones separated by a vertical divider.

Widely supported

Stat row

Stat row snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Stat/metric card

Dashboard stat card showing a large number, label, and trend indicator. Responsive, accessible, pure CSS with oklch() colors.

no-js
Widely supported

Step indicator

Step indicator snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Switch / toggle

An iOS-style toggle switch built with a hidden checkbox and CSS. Smooth thumb animation, accessible, zero JavaScript.

no-js
Widely supported

Tag cloud / chip group

A flex-wrap tag cloud with consistent chip styling using oklch colors.

layout
Widely supported

Testimonial card

Customer testimonial card with avatar, quote, name, and role. Quotation marks via ::before pseudo-element, pure CSS.

no-js
Widely supported

Textarea

Styled textarea with focus ring, character count hint, and auto-resize behavior. Dark-mode ready, accessible, pure CSS.

no-js
Widely supported

Timeline

Vertical timeline with connected dots and alternating content cards. Pure CSS using border and pseudo-elements.

no-js
Widely supported

Toast notification

A fixed-position notification that slides in from the bottom-right with auto-dismiss animation. Pure CSS keyframes.

animation
Widely supported

Toggle button

A CSS-only toggle switch using a hidden checkbox and label. Smooth sliding knob transition with no JavaScript required.

no-js
Widely supported

CSS tooltip

A pure CSS tooltip using ::after and attr() that appears on hover with a smooth transition.

no-js
Widely supported

Top navigation bar

Responsive top nav with logo, links, and sticky positioning.

layout
Widely supported

Tree view

Tree view snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Type-Based Input Styling

Style HTML inputs differently by type using CSS attribute selectors for text, email, password, and number fields.

no-js
Widely supported

Under construction

Under construction snippet with a live demo, copyable CSS, and implementation prompt.

no-js
Widely supported

Validation states

CSS form validation states using :valid, :invalid, and :user-invalid pseudo-classes. Green and red oklch borders with transitions. No JavaScript.

no-js
Widely supported

Video card

A responsive video preview card with aspect-ratio thumbnail, play overlay, and metadata row. Pure CSS—use it for feeds, tutorials, and playlists.

layoutno-js
Widely Supported

Alert banner

Four semantic alert variants — info, success, warning, and error — built with CSS custom properties and oklch() colors. No JavaScript required.

uino-js
Widely Supported

CSS accordion

A smooth expanding accordion built with the HTML details/summary elements — no JavaScript, fully accessible, animated with CSS transitions.

uino-js