UI components — index

This is a one-page index of every UI component the framework ships.
The canonical reference for any given component is its live demo
page
at /components/<slug> plus the Go doc comments on the
component's Config / constructor — those stay current automatically
because each release lands the demo + the code together.


Where to look for what

You want…Look at
Live behavior (click it, drag it)Run the website: ./scripts/dev-watch.sh/components/<slug>
Constructor signature + every fieldgo doc github.com/DonaldMurillo/gofastr/framework/ui.<Name>
Pattern packages (Combobox, Tree, …)go doc github.com/DonaldMurillo/gofastr/core-ui/patterns/<pkg>
Widget presets (Modal, Drawer, …)go doc github.com/DonaldMurillo/gofastr/core-ui/widget/preset
Runtime data-fui-* attributescore-ui/ARCHITECTURE.md
What's coming / deferredROADMAP.md §5

The website's components index page lists every component with a
one-line description (examples/site/components.go
is the source of truth). The examples/site test suite
keeps every registered /components/<slug> paired with:

  • at least one chromedp e2e test
  • zero axe-core violations against the default WCAG 2.0/2.1 A/AA rule set
  • at least one *_test.go for the package that defines it

Catalog

Live demos at http://localhost:8082/components/<slug> once the
dev server is up.

Primitives & semantic markup

  • kbdcore-ui/html.Kbd — semantic <kbd> for keyboard input
  • shortcuthintframework/ui.ShortcutHint — OS-aware chord chips (⌘ on Mac / Ctrl elsewhere)
  • avatargroupframework/ui.AvatarGroup — overlapping avatar stack with overflow chip
  • iconframework/ui.Icon — inline-SVG primitive backed by RegisterIcon; 10 built-ins, currentColor stroke, AriaLabel flips to role="img"

Buttons & form controls

  • toggleframework/ui.Checkbox / Radio / Switch — labelled native inputs, FieldErrors-aware
  • segmentedframework/ui.Segmented — radio-group styled as a sliding pill bar
  • ratingframework/ui.RatingInput — 1-N star/heart with Size / Gap / Shape / Icon knobs
  • sliderframework/ui.Slider<input type=range> with optional live value mirror
  • rangesliderframework/ui.RangeSlider — dual-thumb range with cross-clamp
  • numberinputframework/ui.NumberInput — number field with explicit +/- buttons
  • textareaframework/ui.TextArea — multi-line input with typed Autogrow
  • colorpickerframework/ui.ColorPicker — styled native <input type=color>
  • timepickerframework/ui.TimePicker — styled native <input type=time>
  • selectframework/ui.Select — labelled native <select> with help, error, placeholder, and required marker
  • taginputframework/ui.TagInput — free-form chips, Enter/comma to commit, Backspace to remove
  • multiselectcore-ui/patterns/multiselect — checkbox group with chip display above
  • formsframework/ui form module — fields, validation, conditional sections, step wizard, and repeaters

Selection & input composition

  • comboboxcore-ui/patterns/combobox — debounced search with RPC-driven listbox
  • commandpaletteframework/ui.CommandPalette — ⌘K modal + combobox composition
  • globalsearchframework/ui.GlobalSearch — sticky inline /-shortcut search bar
  • dropzoneframework/ui.FileDropzone — hero file-drop surface with image previews
  • fileuploadframework/ui.FileUpload — drag-drop file picker over native <input type=file>
  • skiplinkframework/ui.SkipLink — focus-visible bypass link for jumping to main content
  • breadcrumbscore-ui/patterns/breadcrumbs<nav aria-label=Breadcrumb> trail
  • paginationcore-ui/patterns/pagination — numeric page navigation
  • sidebarframework/ui.Sidebar — responsive primary nav (inline ≥ md, drawer < md)
  • menuframework/ui.Menu — keyboard-driven dropdown built on <details>
  • tabscore-ui/patterns/tabs<details>-based tab strip, zero JS
  • treecore-ui/patterns/tree — recursive tree with roving tabindex + lazy-load
  • tocframework/ui.TableOfContents — auto-built sticky nav from <h2> / <h3>
  • stepsframework/ui.ProgressSteps — linear step indicator (horizontal + vertical)

Disclosure / surface widgets

  • accordioncore-ui/patterns/accordion — Group + Stack disclosure variants
  • disclosurecore-ui/patterns/disclosure — single styled <details>
  • modalcore-ui/widget/preset.Modal — focus-trapped dialog with deeplink
  • drawercore-ui/widget/preset.Drawer — edge-mounted sliding panel
  • bottomsheetcore-ui/widget/preset.BottomSheet — bottom-anchored Drawer variant
  • popovercore-ui/widget/preset.Popover — click-triggered floating surface
  • tooltipframework/ui.Tooltip — CSS-only hover/focus reveal
  • toastcore-ui/widget/preset.ToastStack — SSE-pushed slide-in notifications
  • notificationbellframework/ui.NotificationBell — bell + unread badge + popover dropdown
  • confirmactionframework/ui.ConfirmAction — trigger + alertdialog Modal
  • commandpalette(also under Selection — same component)

Layout & display

  • layoutframework/ui.Stack / Cluster / Grid / Center / Spacer / Box
  • containerframework/ui.Container — max-width page wrapper with breakpoint padding
  • cardframework/ui.Card — labelled <section> with header/body/footer
  • stickyframework/ui.Sticky — theme-token sticky wrapper for top or bottom edge pinning
  • aspectratioframework/ui.AspectRatio — CLS-safe aspect-ratio wrapper for media and embeds
  • imageframework/ui.OptimizedImage — responsive <picture> with CLS-safe Width/Height
  • dividerframework/ui.Divider — semantic separator (horizontal, vertical, labelled)
  • galleryframework/ui.Gallery — Grid / Strip / Masonry thumbnail surface
  • lightboxframework/ui.Lightbox — zoom-overlay modal; pairs with Gallery
  • carouselframework/ui.Carousel — horizontal scroll-snap slider
  • infinitescrollcore-ui/patterns/infinitescroll — IntersectionObserver-driven lazy feed
  • sortablelistcore-ui/patterns/sortablelist — drag-and-drop + keyboard reorderable list
  • nestedlistcore-ui/patterns/nestedlist — recursive <ul>/<ol> with native <details> collapse on branches
  • scrollspycore-ui/patterns/scrollspy — IntersectionObserver-based active-section tracking for any nav of in-page anchors
  • optimisticactionframework/ui.OptimisticAction — button that flips to its SSR-declared success state on click; the RPC fires underneath and rolls back with a shake on non-2xx
  • networkretrybannerframework/ui.NetworkRetryBanner — persistent banner that shows on RPC-failure threshold or SSE silence; retry button pings a health endpoint to recover

Data display

  • datatableframework/ui.DataTable — sortable / paginated / island-swappable rows
  • statcardframework/ui.StatCard — metric card with label/value/trend
  • animatedcounterframework/ui.AnimatedCounter — IntersectionObserver-driven tick
  • timelineframework/ui.Timeline — vertical event rail
  • sparklineframework/ui.Sparkline — pure-SVG inline trend chart
  • piechartframework/ui.PieChart — SVG ratio chart (donut variant via InnerRadius)
  • barchartframework/ui.BarChart — categorical SVG bar chart
  • linechartframework/ui.LineChart — multi-series time-series chart with area + legend
  • jsonviewerframework/ui.JSONViewer — collapsible tree of arbitrary values
  • diffviewerframework/ui.DiffViewer — unified or split diff renderer
  • markdownframework/ui.Markdown — themed wrapper over core/markdown
  • progresscore-ui/patterns/progress — native <progress> with theme styling
  • skeletoncore-ui/patterns/skeleton — pure-CSS shimmer placeholders
  • spinnerframework/ui.Spinner — inline CSS loading indicator

Tags, badges, filters

  • tagframework/ui.Tag — interactive pill (linked / removable / status-variant)
  • filterchipbarframework/ui.FilterChipBarrole=toolbar of removable filter chips
  • copybuttonframework/ui.CopyButton — clipboard button with SR-announced confirmation
  • toolbarframework/ui.Toolbarrole=toolbar wrapper for grouped actions

Status & banners

  • themetoggleframework/ui.ThemeToggle — dark/light/auto toggle that persists color-scheme mode
  • backtotopframework/ui.BackToTop — fixed scroll affordance that appears after a threshold
  • bannerframework/ui.Banner — page-level persistent status strip
  • pollingindicatorframework/ui.PollingIndicator — pulsing dot + label confirming a polling RPC is firing
  • seocore-ui/seo + uihost.WithSitemap / WithRobots + ScreenCanonical / ScreenHreflangs / ScreenSchema — per-page SEO + sitewide sitemap.xml / robots.txt
  • seo-bundleScreenSEO() returning an SEO struct — per-screen bundle of description + canonical + hreflangs + robots + OG + Twitter Card + JSON-LD in one declaration; alternative to the per-method calls above

Adding a new component — checklist

The framework's drift tests catch most of these; this list is a
helpful pre-flight read for human reviewers.

  1. Implementation: framework/ui/<name>.go (or core-ui/patterns/<name>/).
  2. Theme-token CSS only: register your own RegisterStyle; use
    var(--color-*, fallback) etc. No top-level .ui-* rules in
    examples/site/styles.go — the site chrome is page-only.
  3. Unit tests: <name>_test.go exercising panic paths + emitted
    markup + variant classes.
  4. /components/<slug> screen in examples/site/:
    register in main.go, add an entry to componentCatalog in
    components.go. The catalog drives the site's page-level test
    loops (axe, single-<main>, …), so an unregistered page is an
    untested page.
  5. Chromedp e2e in examples/site/e2e_new_components_test.go
    or e2e_new_components_interactions_test.go — ARIA shape for
    static components, real interaction (click / type / drag) for
    runtime-driven ones.
  6. core-ui/ARCHITECTURE.md: any new data-fui-* attribute the
    runtime reads must land in the table here OR in the drift-test
    whitelist (with a justification comment). The
    TestRuntimeAttrsAreDocumented gate in
    core-ui/runtime/attrdoc_test.go enforces it.
  7. Axe: TestAxe_AllPagesAreClean runs axe-core against
    every catalog page and fails on any violation. The most common authoring
    mistakes it catches: missing tap target floor (44×44),
    role/aria-allowed-role mismatches, color-contrast on tinted
    backgrounds, scrollable regions without tabindex="0".
  8. Composition first: before writing a new runtime module, see if
    preset.Modal / preset.Popover / preset.Drawer +
    data-fui-open + data-fui-deeplink + signal-binding already
    covers the case. Lightbox and NotificationBell each ship without
    a runtime module by composing existing primitives.

Common mistakes

  • Writing a new runtime module when composition already covers it.
    Check preset.Modal / preset.Popover / preset.Drawer +
    data-fui-open + data-fui-deeplink + signal binding first —
    Lightbox and NotificationBell ship with zero new JS by composing
    them. New modules are the expensive path (budget, tests, docs).
  • Styling a component from examples/site/styles.go. Top-level
    .ui-* rules in the site stylesheet are forbidden — the site chrome
    is page-only. A component owns its CSS via registry.RegisterStyle
    with theme tokens, so it works in every host, not just the demo
    site.
  • Hardcoding colors/spacing instead of theme tokens. Use
    {colors.*} / {spacing.*} / var(--color-*, fallback) so themed
    hosts and dark mode don't break your component.
  • Skipping the demo page + e2e pairing. Every /components/<slug>
    page ships with at least one chromedp test and a package unit test
    (suite convention), and TestAxe_AllPagesAreClean automatically
    fails the build on any axe-core violation for every catalog page —
    register the page and you've signed up for all three.
  • Adding a data-fui-* attribute without documenting it. The
    runtime contract lives in core-ui/ARCHITECTURE.md; every attribute
    the runtime reads must be in its table (or an explicitly justified
    whitelist) before the change lands.

See also