| Name | Modified | Size | Downloads / 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.11andgo install github.com/axadrn/shadcn-templ/v2/cmd/shadcn-templ@v2.0.0-beta.11. Then re-add the components you use withshadcn-templ add utils <components...> --overwrite. This installs the shared Base UI scripts incomponents/baseui/, which every interactive component now depends on. Finish withshadcn-templ bundle. - The
data-tui-*attributes andwindow.tuiare gone. Components render shadcn's DOM (data-slot, the state attributes Base UI renders such asdata-open,data-checkedanddata-side, plus Base UI's roles and ARIA), and Base UI props that are never rendered appear asdata-templ-<prop>. In your own scripts, CSS and selectors, usewindow.templinstead ofwindow.tui, select parts bydata-slotand read state from the Base UI attributes.window.templ.tabs.setActivetakes the[data-slot=tabs]element instead of an ID. The scroll lock attribute on<html>isdata-base-ui-scroll-locked. To find old references, rungrep -rn "data-tui-" .andgrep -rn "window.tui\b" .. See the migration notes. - Go props are renamed to their Base UI names:
- dropdown menu and context menu items:
DisableCloseOnClick: truebecomesCloseOnClick: utils.Ptr(false) - select content:
DisableAlignItemWithTrigger: truebecomesAlignItemWithTrigger: utils.Ptr(false), andOpenMethodis removed - dialog, sheet, drawer and command dialog:
DisableDismissiblebecomesDisablePointerDismissal - dialog content and drawer:
DisableModal: truebecomesModal: utils.Ptr(false) - dropdown menu content:
MobileSideandMobileAlignare removed. Switch the side in your layout withwindow.templ.sidebar.onMobileChange, as the sidebar blocks do. - dropdown and context menu
SubProps:ClassandAttributesare removed (a submenu root renders no element).SubContentProps.IDis removed. - radio group items:
Name,Form,CheckedandDefaultCheckedare removed. SetNameandValueorDefaultValueonradiogroup.RadioGroup, and listen toradio-group-value-changeinstead of the item eventradio-checked-change. - tabs:
TabsIDis removed from triggers and content - toast:
toast.Propsandtoast.ToasterPropsno longer takeID,ClassorAttributes - Input OTP is a port of input-otp.
MaxLengthis required,Valueis now the controlled*string, so an initial value moves toDefaultValue.NameandFormgo intoAttributes, which land on the input. - Calendar is a port of react-day-picker and takes DayPicker's props:
Selectedtakes atime.Time, a[]time.TimewithModeMultiple, or acalendar.DateRange{From, To}withModeRange.EndValueis removed.Monthis now controlled. UseDefaultMonthfor the month shown first.HideOutsideDays: truebecomesShowOutsideDays: utils.Ptr(false).MinDateandMaxDatebecomeStartMonthandEndMonthfor navigation, andDisabledmatchers (calendar.DateBefore,DateAfter,DateInterval,DayOfWeek) to block dates.BookedDatesbecomesModifierswithModifiersClassNames.NameandEndNameand their hidden inputs are removed. Write the value from thecalendar-selectevent, which replacescalendar-change.calendar-setis replaced bywindow.templ.calendar.setSelected, andcalendar-renderedis 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 adivviewport instead of a native<dialog>. - RTL support:
DirectionProvidersets 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 takesDirection, and chartXAxisPropstakeReversed. - Calendar supports multiple selection, matchers, modifiers,
dropdown-monthsanddropdown-yearscaption layouts,ar-SAmonth and weekday names, andDateLib: calendar.DateLibPersianfor the Persian (Jalali) calendar. - Slider
ValueandDefaultValuetake a single number or a[]float64, like Base UI. Existing[]float64code keeps compiling. - Select and combobox take Base UI's
Items(ItemData{Value, Label}), so labels render on the server. - New props: toggle group
Disabledand iconSize. - New
window.templsetters for controlled components:slider.setValues,toggleGroup.setValue,checkbox.setChecked,select.setValue,collapsible.setOpen,inputOTP.setValue, andcalendar.setSelectedandsetMonth. - Monorepo support (#623):
shadcn-templ init my-app --monoreposcaffolds one Go module with sharedcomponents/andutils/and a first app inapps/web, like shadcn'sinit --monorepo. Add more apps withinit --cwd apps/admin. Each app has its owncomponents.json, CSS and script bundle and shares the installed components. Existing modules work too: runinitandaddwith--cwdin an app directory below thego.mod. See the monorepo guide. - templ is updated to
v0.3.1070. - The scaffold gets
task build(Tailwind, bundle,templ generate,go build) and aDockerfilethat runs it. It also pinstemplandshadcn-templas Go tools ingo.mod.
Patch Changes
- Fixed
Cannot read properties of undefined (reading 'lifecycle')in projects bundled with the beta.10 CLI. The CLI now bundlescomponents/baseui/*.jsbefore the component scripts. Update the CLI and runshadcn-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 ashx-poston 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-checkednordata-unchecked, like Base UI. - A popover opened with
window.templ.popover.opennow shows its trigger as open. drawer.Contentattributes now go onto the popup, like upstream.- Copy buttons on docs code blocks now keep line breaks (#622).