mljr-ui · showcase

Component catalogue

Every registered component, rendered with default props. Cycle theme and mode to verify all four skins.

Stack
What this is, what it does, and why

Server renders HTML. Datastar adds signals. Motion handles animations. No JS framework. No hydration. No CDN.

mljr-ui is a production Go component library built for speed and minimal client-side footprint. Each component is a pure Go function that renders typed HTML. Reactivity comes from Datastar's 14 KB SSE-driven signal layer — not a SPA framework. The total client JS budget is under 40 KB (Datastar 14 KB + Motion 24 KB), and every byte earns its place.

Go + gomponents1.23
Server rendering

Type-safe HTML components. No templates, no JSX. Server owns the HTML.

Datastar1.0.2
Hypermedia reactivity

Signal-based interactivity over SSE. No virtual DOM, no hydration step.

Tailwindv4
Design system

4 themes × 2 modes. CSS-only, zero runtime. Rebuilt per component category.

Motionv10
Animations

24 KB WAAPI-based library. Spring physics, stagger, inView, timeline. No React.

Request flow

BrowserGo handlergomponents HTMLDatastar signalsSSE patchMotion animate

Animation

8 components

Gesture & Hover

Micro-interactions on hover, focus, and click. Motion handles enter/leave without CSS keyframes.

animation · ds-anim-gestureView →

Loading Morphs

Motion.timeline() morphs skeleton placeholders into real content. Staged entrance with stagger.

animation · ds-anim-morphView →

Logo Scatter

Pill-shaped logo pieces scatter across the viewport on a loop, then sway gently before reassembling. Built with Motion v10 WAAPI transforms.

animation · ds-anim-logoView →

Page Transitions

Simulate route transitions with Motion.timeline — outgoing content exits, incoming content enters.

animation · ds-anim-transitionView →

Scroll Progress

Motion.scroll() links animation progress to page scroll position. Zero event listeners, zero JS overhead.

animation · ds-anim-scrollView →

Spring Physics

Motion.spring() produces physics-based easing. Tune stiffness, damping, and mass for wildly different feels.

animation · ds-anim-springView →

Text Reveal

Three distinct character-level reveal effects: blur rise, scale scatter, and wave rotation.

animation · ds-anim-textView →

inView Reveals

Motion.inView() triggers animations when elements enter a scrollable viewport — zero scroll event listeners.

animation · ds-anim-inviewView →

Data

25 components

Bar Chart

Pure SVG bar chart rendered server-side. No JS, no canvas. Accepts any data slice.

data · bar-chartView →

Carousel

Pure Datastar image carousel with prev/next and dot navigation.

data · carouselView →

Data Grid

Sortable, filterable, paginated data table. All logic client-side — no server roundtrip for sort/filter.

data · data-gridView →

Description List

Term/definition pairs in an aligned grid layout.

data · description-listView →

Donut Chart

Pure-SVG donut chart using stroke-dasharray. Includes legend, center label, and hover tooltips.

data · donut-chartView →

Gauge / Meter

SVG circular gauge with 270° arc. Optional tick marks. Server-side rendered — zero JS.

data · gaugeView →

GitHub Heatmap

GitHub-style contribution heatmap. SVG rendered server-side from date/value pairs. Zero JS, zero dependencies.

data · heatmapView →

Horizontal Timeline

CSS scroll-snap horizontal timeline. Dot + card per item. No JS — pure CSS scroll.

data · horizontal-timelineView →

Infinite Scroll

Sentinel div triggers Datastar @get when it enters the viewport. Server appends HTML. One Datastar attribute — no custom JS.

data · infinite-scrollView →

Lazy Image

IntersectionObserver lazy-loads image on scroll. Skeleton placeholder fades to image on load.

data · lazy-imageView →

Line Chart

Pure-SVG multi-series line/area chart rendered server-side. Smooth bezier curves, optional grid, dots, and fill.

data · line-chartView →

List

Styled unordered or ordered list. Divided variant adds row separators.

data · listView →

Paginated Pages

Animated page container driven by the Pagination signal — replays an entrance animation once per page switch.

data · paginated-pagesView →

Pagination

Client-side pagination controls driven by a Datastar signal.

data · paginationView →

Pie Chart

Pure SVG solid pie chart using arc paths. Legend with percentage labels. No JS.

data · pie-chartView →

Radar Chart

Multi-series radar/spider chart rendered as inline SVG. Server-side Go math — zero JS, zero canvas.

data · radar-chartView →

Snake Timeline

Serpentine timeline where items flow left→right in odd rows and right→left in even rows. Curved connectors bridge the row ends. Great for long event histories without excessive vertical scroll.

data · snake-timelineView →

Sortable List

Drag-to-reorder list using HTML5 drag-and-drop API. Optional grab handle icon. OnChange callback with new value order.

data · sortableView →

Sparkline

Tiny inline SVG trend line for use inside stat cards, tables, or dashboard tiles.

data · sparklineView →

Stat Card

Key metric display: label, large value, optional delta with up/down coloring.

data · stat-cardView →

Syntax Highlighter

Server-side syntax highlighting via chroma. Zero client JS — inline styles. Supports 300+ languages, 40+ themes.

data · syntax-highlighterView →

Table

Design-system styled data table. Supports striped rows and hover state.

data · tableView →

Timeline

Vertical timeline of dated entries with card cards and tags.

data · timelineView →

Tree View

Hierarchical collapsible tree using native <details> elements. No JS, keyboard accessible.

data · tree-viewView →

Virtual List

Scrollable list using CSS content-visibility:auto for zero-JS viewport culling. Browser skips layout/paint for off-screen rows.

data · virtual-listView →

Datastar

9 components

Animation (Motion)

Motion v10 (window.Motion, 24 KB) provides animate(), timeline(), stagger(), and inView(). Call from any Datastar expression.

datastar · ds-animationView →

Effects & Refs

data-effect runs side-effects when signals change. data-ref captures element references. data-init fires once on mount.

datastar · ds-effectsView →

Events

data-on:EVENT handles DOM events. data-on-interval runs on a timer. data-on-intersect fires on viewport entry.

datastar · ds-eventsView →

Fetch (SSE)

@get and @post send signals to the server via SSE. data-indicator shows loading state. The connection is request-response (not persistent).

datastar · ds-fetchView →

Modifiers

Event modifiers after __ control how handlers fire: debounce, throttle, window, document, stop, prevent, once, passive.

datastar · ds-modifiersView →

Patterns

Real-world patterns: client-side search filter, multi-step wizard, optimistic toggle.

datastar · ds-patternsView →

Reactivity

data-text, data-show, data-bind, data-attr, data-style, data-class — six ways to reflect signal state in the DOM.

datastar · ds-reactivityView →

Server Push (SSE)

PatchElements morphs DOM fragments. PatchSignals updates client state. data-on-signal-patch reacts to incoming patches.

datastar · ds-pushView →

Signals

data-signals declares reactive state. data-computed derives new signals from expressions. Signals scope to their subtree.

datastar · ds-signalsView →

Feedback

8 components

Alert

Contextual banner: info / success / warning / danger. Optional dismiss button.

feedback · alertView →

Empty State

Centred placeholder for zero-data views. Icon, title, message, action buttons.

feedback · empty-stateView →

Loading Overlay

Full-surface spinner overlay driven by a Datastar signal. Covers content while async operations run.

feedback · loading-overlayView →

Notification Badge

Count badge overlaid top-right on any content — icons, buttons, avatars.

feedback · notification-badgeView →

Notification Stack

Fixed-position persistent notification feed. Add via window._pushNotification(). Auto-dismisses with duration.

feedback · notification-stackView →

Shimmer

Animated gradient loading placeholder. Lighter than Skeleton — just the shimmer effect with configurable size and shape.

feedback · shimmerView →

Skeleton

Shimmering content placeholder for loading states.

feedback · skeletonView →

Spinner

CSS-animated loading indicator. Six variants × three sizes. Swiss + Ink variants match their themes.

feedback · spinnerView →

Form

22 components

Calendar Picker

Custom styled date picker. Month grid with keyboard-friendly day selection. Submits ISO 8601 value via hidden input. No external library.

form · calendar-pickerView →

Checkbox

Styled checkbox bound to a boolean Datastar signal.

form · checkboxView →

Color Input

Styled native color picker with optional hex label. Datastar signal tracks the selected value.

form · color-inputView →

Combobox

Filterable select — type to search, arrow keys to navigate, Enter to select. Hidden input carries the value.

form · comboboxView →

Contact Form

Full contact form: fields, validation error display, altcha captcha, honeypot, SSE submit.

form · contact-formView →

Date Input

Styled native date picker. Uses browser-native calendar popup. Same visual style as other inputs.

form · date-inputView →

File Drop Zone

Drag-and-drop file upload area. Shows file names on selection, drag-over highlight state.

form · file-drop-zoneView →

File Input

Styled file upload trigger with filename feedback. Wraps a hidden native input.

form · file-inputView →

Input

Text input bound to a Datastar signal. Supports type, placeholder, required.

form · inputView →

Input Group

Input with prefix/suffix addons — icons, text, or buttons.

form · input-groupView →

Multi Select

Chip-based multi-value selector with dropdown. Selected values displayed as removable chips; hidden inputs carry values for form submission.

form · multi-selectView →

Number Input

Stepper with − and + buttons. Min/max/step enforced via Datastar expressions.

form · number-inputView →

OTP Input

One-time-password entry — single-digit boxes with auto-advance, backspace navigation, and paste support.

form · otp-inputView →

Password Input

Password field with show/hide toggle. Datastar signal tracks visibility; data-attr swaps input type.

form · password-inputView →

Radio Group

Styled radio buttons via RadioGroup, bound to a shared signal.

form · radioView →

Range Pair

Min/max dual-handle range selector. Two overlapping range inputs with Datastar signals enforcing low ≤ high.

form · range-pairView →

Search Input

Search field with icon prefix, optional Datastar debounced @get, and clear button.

form · search-inputView →

Select

Dropdown select with custom arrow, bound to a Datastar signal.

form · selectView →

Slider

Styled range input with Datastar binding and optional value label.

form · sliderView →

Switch

Toggle switch bound to a boolean Datastar signal. Companion to Checkbox.

form · switchView →

Tags Input

Multi-value input — type and press Enter or comma to add, × to remove. Hidden input carries comma-separated values.

form · tags-inputView →

Textarea

Multiline text input with Datastar signal binding.

form · textareaView →

Layout

19 components

Accordion

Collapsible content sections using native <details>/<summary> — no JS required.

layout · accordionView →

App Shell

Sidebar + main content layout. Wraps layout.Sidebar with a flex container.

layout · app-shellView →

Auth Layout

Centered single-column card layout for login and register pages.

layout · auth-layoutView →

Background

Decorative CSS pattern layer. Dots, grid, lines, diagonal, cross, or gradient. Position absolute, pointer-events none.

layout · backgroundView →

Banner

Full-width announcement strip. Variants match semantic colors. Optional dismiss button.

layout · bannerView →

Bento Grid

Mosaic CSS grid layout. BentoItem controls column and row spans. Great for dashboards, feature showcases, landing pages.

layout · bento-gridView →

Breadcrumb

Navigation trail built from BreadcrumbItems. Last item is current page (no link).

layout · breadcrumbView →

Container

Max-width content wrapper with responsive horizontal padding.

layout · containerView →

Divider

Horizontal separator rule with optional centered text label.

layout · dividerView →

Footer

Page footer. Structured neo-brutalist variant with brand cell, titled link columns and bottom bar — or a simple flex row via children.

layout · footerView →

Grid / Col

12-column CSS grid. Col data-span controls width.

layout · gridView →

Masonry Grid

CSS-columns masonry layout. Items flow top-to-bottom. Zero JS — pure CSS column-count.

layout · masonryView →

Navbar

Page header with brand, nav links, and actions slots.

layout · navbarView →

Resizable Panels

Two panels with a drag handle. Pointer events, touch support, configurable split and min-size.

layout · resizable-panelsView →

Sidebar

Collapsible left navigation sidebar. Datastar signal controls open/collapsed state. Width transitions smoothly.

layout · sidebarView →

Stack

Flex column (v) or row (h) with configurable gap, align, and justify.

layout · stackView →

Stepper

Horizontal multi-step progress indicator. States: complete / active / upcoming.

layout · stepperView →

Table of Contents

Scroll-spy navigation for long-form content. Highlights active section via IntersectionObserver. Can auto-detect headings.

layout · table-of-contentsView →

Tabs

Datastar-driven tabbed panels. Signal holds the active tab slug; switching is instant.

layout · tabsView →

Overlay

11 components

Alert Dialog

Confirmation dialog with cancel/confirm. Driven by Datastar signal; confirm runs an expression before closing.

overlay · alert-dialogView →

Command Palette

⌘K command palette overlay. Filterable list of actions, grouped with keyboard navigation.

overlay · commandView →

Context Menu

Right-click context menu anchored to the cursor. Closes on click-outside, Escape, or item selection.

overlay · context-menuView →

Drawer

Datastar-gated slide-in side panel. Right or left placement, three sizes.

overlay · drawerView →

Dropdown

Datastar-driven contextual menu. Closes on outside-click via window listener.

overlay · dropdownView →

Hover Card

Rich content card triggered by hovering. Pure CSS — no JS, no Datastar. Ideal for user profile previews, link previews.

overlay · hover-cardView →

Lightbox

Full-screen image viewer. Click thumbnail to open, ←/→ keys navigate, click backdrop or × to close.

overlay · lightboxView →

Modal

Scrim + dialog gated by $modalOpen signal. Size: sm|md|lg.

overlay · modalView →

Popover

Positioned floating panel gated by a Datastar signal. Closes on outside-click.

overlay · popoverView →

Sheet

Full-edge slide-in panel. Bottom placement suits mobile; right placement suits desktop side panels.

overlay · sheetView →

Toast

Self-managing notification stack: auto-dismiss timer, progress bar, icons, variant tones, queue up to 6.

overlay · toastView →

Primitive

45 components

Announcement Bar

Dismissable top-of-page strip. Datastar signal controls visibility.

primitive · announcement-barView →

Audio Player

Native HTML5 audio with animated Canvas waveform (40 bars), play/pause, scrub, time display. Zero external JS.

primitive · audio-playerView →

Avatar

User avatar with image or initials fallback, optional status dot, and size/shape variants.

primitive · avatarView →

Avatar Group

Stacked overlapping avatars with +N overflow badge for large sets.

primitive · avatar-groupView →

Badge

Small pill label for counts, statuses, or tags. Variants match semantic colors.

primitive · badgeView →

Button

Brutalist press button with variant/size/tone matrix.

primitive · buttonView →

Button Group

Horizontal group of related buttons. Attached mode collapses shared borders into a connected strip.

primitive · button-groupView →

CTA Banner

Full-width call-to-action strip with title, description, and one or two action buttons.

primitive · cta-bannerView →

Callout

Left-bordered highlight block for tips, notes, and warnings. Variants match semantic colors.

primitive · calloutView →

Card

Bordered, shadow-dropped container. Tone controls fill.

primitive · cardView →

Chip

Dismissible pill tag. Click × removes from DOM or calls a custom Datastar expression.

primitive · chipView →

Code Block

Styled pre/code display with language label and copy-to-clipboard button.

primitive · code-blockView →

Collapse

Animated show/hide region driven by a Datastar signal. Max-height CSS transition, no JS.

primitive · collapseView →

Color Swatch

Single color preview tile. Use ColorSwatchGroup for palettes. Supports square and circle shapes.

primitive · color-swatchView →

Copy Button

Copies text to clipboard. Datastar signal flips to show checkmark feedback, resets after 2 s.

primitive · copy-buttonView →

Countdown

Live countdown timer to a target datetime. Updates every second via JS setInterval.

primitive · countdownView →

Display

Hero display headline with highlighter <em> and accent <mark>.

primitive · displayView →

FAB

Floating action button fixed to a viewport corner. Speed Dial variant expands a mini-action list.

primitive · fabView →

Feature Card

Marketing card with colored icon box, title, and description. Optionally a link.

primitive · feature-cardView →

Flip Card

3D CSS flip on hover or Datastar-signal click. Front and back faces are fully custom content.

primitive · flip-cardView →

Gradient Text

CSS background-clip:text gradient fill. Theme-aware by default (accent → ink). Any HTML tag, any gradient angle.

primitive · gradient-textView →

Heading

h1..h5 with Swiss display type and tracking.

primitive · headingView →

Icon

Iconify-generated SVGs rendered inline. All registered icons shown below — searchable and copy-on-click.

primitive · iconView →

Icon Button

Square icon-only button. Thin wrapper over Button with size=icon — adds aria-label and pass-through Attrs.

primitive · icon-buttonView →

Kbd

Keyboard shortcut display. Monospace pill with press-depth border.

primitive · kbdView →

Marquee

Infinite horizontal scroll strip. CSS-only animation — items duplicated server-side for seamless loop. Optional pause-on-hover.

primitive · marqueeView →

Media Card

Card with an image/media area on top and content below. Badge overlay, lazy loading, optional title link, action slot.

primitive · media-cardView →

Number Ticker

Animated number counter using requestAnimationFrame with ease-out cubic easing. Optional IntersectionObserver trigger.

primitive · number-tickerView →

Pricing Card

Pricing tier card with price display, feature checklist, and CTA button.

primitive · pricing-cardView →

Progress

Horizontal progress bar with value, optional label, semantic variant colors, and three sizes.

primitive · progressView →

Progress Ring

SVG circular progress indicator. Server-rendered with correct stroke-dashoffset.

primitive · progress-ringView →

Rating

Star rating widget. Datastar signal holds current value. Read-only variant available.

primitive · ratingView →

Read Progress

Thin progress bar fixed at top of page that fills as the user scrolls. Tracks window scroll or a custom container.

primitive · read-progressView →

Scroll Area

Styled scroll container with thin themed scrollbars via CSS scrollbar-width + scrollbar-color.

primitive · scroll-areaView →

Scroll To Top

Fixed button that appears after scrolling past a threshold. Smooth-scrolls to top on click. Zero dependencies.

primitive · scroll-to-topView →

Segmented Control

Radio group styled as a connected button bar. Keyboard accessible via native radio inputs.

primitive · segmentedView →

Share Button

Web Share API with clipboard fallback. Uses navigator.share() on supported devices; copies link on desktop.

primitive · share-buttonView →

Split Button

Primary action button with chevron dropdown for alternate actions. Datastar signal controls dropdown open state.

primitive · split-buttonView →

Tag

Uppercase chip; colors via data-tone.

primitive · tagView →

Tilt Card

3D perspective tilt driven by pointer position. Optional shine gradient overlay. Zero JS libraries.

primitive · tilt-cardView →

Toggle Group

Segmented button control. Only one option active at a time, driven by a Datastar signal.

primitive · toggle-groupView →

Tooltip

CSS-only hover tooltip. Four placement options. No JavaScript required.

primitive · tooltipView →

Typewriter

Animated type-and-delete loop across multiple phrases. No dependencies — pure JS setInterval with configurable speed/pause.

primitive · typewriterView →

Video Player

Native HTML5 video with custom-styled controls: play/pause, scrub, volume, mute, speed selector, fullscreen. Zero external JS.

primitive · video-playerView →

Word Rotate

Cycles through a list of words with a fade+slide transition. No dependencies — pure CSS transitions + setInterval.

primitive · word-rotateView →

Special

9 components

Captcha (Altcha)

Self-hosted proof-of-work captcha. No CDN, no telemetry. challenge= sets the JSON challenge endpoint.

special · captchaView →

Confetti

Canvas confetti burst. Trigger on click, page load, or manually via window._confetti(). rAF animated, self-cleaning canvas.

special · confettiView →

Cookie Banner

GDPR cookie consent banner. Renders via JS — hides instantly if already accepted. localStorage persist. No Datastar needed.

special · cookie-bannerView →

Language Toggle

Cycles through locales, persists in cookie, optional page reload. Drop-in for multilingual sites.

special · language-toggleView →

Login Form

Composite sign-in form: email + password (show/hide) + remember me + submit. Composed from form.Field, form.Input, form.PasswordInput, primitive.Button.

special · login-formView →

Onboarding Tour

Step-by-step spotlight tour with floating tooltip. Clip-path overlay highlights target element. No external library.

special · onboarding-tourView →

OpenMap

Leaflet-powered interactive map using OpenStreetMap tiles. Self-hosted JS (148KB). Drop pins with popups.

special · open-mapView →

Theme / Mode Toggle

Cycles $theme (swissbrut↔ink) and $mode (light↔dark). ThemeToggleRoot must appear once per page.

special · theme-toggleView →

User Menu

Composite: clickable Avatar opens a dropdown with identity header + action items. Composed from primitive.Avatar + custom Datastar dropdown.

special · user-menuView →