Download Latest Version v2.0.0-beta.13 source code.zip (6.1 MB) Google Add to Preferred Sources
Home / v2.0.0-beta.11
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-05 7.3 kB
v2.0.0-beta.11 source code.tar.gz 2026-10-05 5.0 MB
v2.0.0-beta.11 source code.zip 2026-10-05 6.1 MB
Totals: 3 Items   11.1 MB 0

Breaking Changes

  • Update the module and the CLI with go get github.com/axadrn/shadcn-templ/v2@v2.0.0-beta.11 and go install github.com/axadrn/shadcn-templ/v2/cmd/shadcn-templ@v2.0.0-beta.11. Then re-add the components you use with shadcn-templ add utils <components...> --overwrite. This installs the shared Base UI scripts in components/baseui/, which every interactive component now depends on. Finish with shadcn-templ bundle.
  • The data-tui-* attributes and window.tui are gone. Components render shadcn's DOM (data-slot, the state attributes Base UI renders such as data-open, data-checked and data-side, plus Base UI's roles and ARIA), and Base UI props that are never rendered appear as data-templ-<prop>. In your own scripts, CSS and selectors, use window.templ instead of window.tui, select parts by data-slot and read state from the Base UI attributes. window.templ.tabs.setActive takes the [data-slot=tabs] element instead of an ID. The scroll lock attribute on <html> is data-base-ui-scroll-locked. To find old references, run grep -rn "data-tui-" . and grep -rn "window.tui\b" .. See the migration notes.
  • Go props are renamed to their Base UI names:
  • dropdown menu and context menu items: DisableCloseOnClick: true becomes CloseOnClick: utils.Ptr(false)
  • select content: DisableAlignItemWithTrigger: true becomes AlignItemWithTrigger: utils.Ptr(false), and OpenMethod is removed
  • dialog, sheet, drawer and command dialog: DisableDismissible becomes DisablePointerDismissal
  • dialog content and drawer: DisableModal: true becomes Modal: utils.Ptr(false)
  • dropdown menu content: MobileSide and MobileAlign are removed. Switch the side in your layout with window.templ.sidebar.onMobileChange, as the sidebar blocks do.
  • dropdown and context menu SubProps: Class and Attributes are removed (a submenu root renders no element). SubContentProps.ID is removed.
  • radio group items: Name, Form, Checked and DefaultChecked are removed. Set Name and Value or DefaultValue on radiogroup.RadioGroup, and listen to radio-group-value-change instead of the item event radio-checked-change.
  • tabs: TabsID is removed from triggers and content
  • toast: toast.Props and toast.ToasterProps no longer take ID, Class or Attributes
  • Input OTP is a port of input-otp. MaxLength is required, Value is now the controlled *string, so an initial value moves to DefaultValue. Name and Form go into Attributes, which land on the input.
  • Calendar is a port of react-day-picker and takes DayPicker's props:
  • Selected takes a time.Time, a []time.Time with ModeMultiple, or a calendar.DateRange{From, To} with ModeRange. EndValue is removed.
  • Month is now controlled. Use DefaultMonth for the month shown first.
  • HideOutsideDays: true becomes ShowOutsideDays: utils.Ptr(false).
  • MinDate and MaxDate become StartMonth and EndMonth for navigation, and Disabled matchers (calendar.DateBefore, DateAfter, DateInterval, DayOfWeek) to block dates.
  • BookedDates becomes Modifiers with ModifiersClassNames.
  • Name and EndName and their hidden inputs are removed. Write the value from the calendar-select event, which replaces calendar-change. calendar-set is replaced by window.templ.calendar.setSelected, and calendar-rendered is removed.

Minor Changes

  • New components: attachment, bubble, direction (DirectionProvider), marker, menubar, message, message scroller, native select, navigation menu, questionnaire and scroll area.
  • Every component is checked against shadcn's Base UI components in the browser. 557 examples, upstream's included, are compared on DOM, focus, scroll lock, pixels and console errors against a local build of shadcn at a pinned commit. Remaining differences are documented, among them: sonner is not ported (the Base UI toast covers it), and lucide icons stand in where upstream uses tabler icons.
  • Component behavior is ported from Base UI's building blocks: one lifecycle observer, portal, dismiss, transitions, focus manager, anchor positioning, hover with safe polygon, list navigation, typeahead and composite focus. Menus share one core, tooltips open instantly within a delay group like TooltipProvider, slider thumbs hold a native range input, and the drawer renders a div viewport instead of a native <dialog>.
  • RTL support: DirectionProvider sets the direction for keyboard navigation and positioning. RTL-compiled components ("rtl": true) turn physical utilities into logical ones like shadcn. Every RTL example from upstream is ported. Carousel takes Direction, and chart XAxisProps take Reversed.
  • Calendar supports multiple selection, matchers, modifiers, dropdown-months and dropdown-years caption layouts, ar-SA month and weekday names, and DateLib: calendar.DateLibPersian for the Persian (Jalali) calendar.
  • Slider Value and DefaultValue take a single number or a []float64, like Base UI. Existing []float64 code keeps compiling.
  • Select and combobox take Base UI's Items (ItemData{Value, Label}), so labels render on the server.
  • New props: toggle group Disabled and icon Size.
  • New window.templ setters for controlled components: slider.setValues, toggleGroup.setValue, checkbox.setChecked, select.setValue, collapsible.setOpen, inputOTP.setValue, and calendar.setSelected and setMonth.
  • Monorepo support (#623): shadcn-templ init my-app --monorepo scaffolds one Go module with shared components/ and utils/ and a first app in apps/web, like shadcn's init --monorepo. Add more apps with init --cwd apps/admin. Each app has its own components.json, CSS and script bundle and shares the installed components. Existing modules work too: run init and add with --cwd in an app directory below the go.mod. See the monorepo guide.
  • templ is updated to v0.3.1070.
  • The scaffold gets task build (Tailwind, bundle, templ generate, go build) and a Dockerfile that runs it. It also pins templ and shadcn-templ as Go tools in go.mod.

Patch Changes

  • Fixed Cannot read properties of undefined (reading 'lifecycle') in projects bundled with the beta.10 CLI. The CLI now bundles components/baseui/*.js before the component scripts. Update the CLI and run shadcn-templ bundle (#625).
  • Portaled content (menus, popovers, selects, dialogs, drawers and others) now moves to <body> when it opens instead of at load, so htmx attributes such as hx-post on a dropdown menu item work (#616).
  • A pressed combobox item keeps the focus in the input, like Base UI (#621).
  • Stacked radial charts now span the stack total, so every segment renders (#618, thanks @eschmar for the fix and the thorough analysis).
  • A mixed checkbox renders neither data-checked nor data-unchecked, like Base UI.
  • A popover opened with window.templ.popover.open now shows its trigger as open.
  • drawer.Content attributes now go onto the popup, like upstream.
  • Copy buttons on docs code blocks now keep line breaks (#622).
Source: README.md, updated 2026-10-05