Documentation

Beautiful, accessible components built with Go, templ, and Datastar.

Philosophy

DatastarUI is inspired by shadcn/ui. Like shadcn, this is NOT a component library that you install as a dependency. It's a collection of reusable components that you can copy and paste into your apps.

Why copy/paste instead of packaging?

  • You own the code. Need to change something? Just edit it.
  • No versioning conflicts or breaking changes to worry about.
  • Zero configuration complexity. Customize by changing the code.

Every component maintains pixel-perfect parity with shadcn/ui while using server-side rendering with Go/templ and only 15KB of JavaScript (the Datastar library) for reactivity.

Getting Started

Each component follows a consistent pattern with:

  • component.templ - The component template and signals
  • props.go - Component props parameter definitions
  • variants.go - CSS variant configurations based on shadcn
  • expressions.go - Component-specific Datastar expressions (if needed)

Available Components

All components are built with accessibility in mind and follow the same patterns as shadcn/ui.