-
-
Embed chart
-
-
-
-
-
- Show legend by default
-
-
- Include current timeline zoom
-
-
- Lock current chart width
-
-
-
-
-
- URL
- {
- void copyText('url', embedUrl)
- }}
- />
-
-
-
-
-
-
-
- Iframe
-
-
{
- void copyText('iframe', iframeCode)
- }}
- />
+
+
+ }
+ />
+
+
+
+
+
+
+
Embed chart
+
+
+
+
+
+ Show legend by default
+
+
+ Include current timeline zoom
+
+
+ Lock current chart width
+
+
+
+
+
+
+ URL
+
+ {
+ void copyText('url', embedUrl)
+ }}
+ />
+
+
+
+
+
+
+
+ Iframe
+
+ {
+ void copyText('iframe', iframeCode)
+ }}
+ />
+
+
+
-
-
-
-
-
+
+
+
+
)
}
diff --git a/src/components/npm-stats/PackagePills.tsx b/src/components/npm-stats/PackagePills.tsx
index f073c9541..f0285ec8a 100644
--- a/src/components/npm-stats/PackagePills.tsx
+++ b/src/components/npm-stats/PackagePills.tsx
@@ -7,12 +7,7 @@ import {
EyeSlashIcon,
DotsThreeVerticalIcon,
} from '@phosphor-icons/react'
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
-} from '@radix-ui/react-dropdown-menu'
+import { Menu } from '@base-ui/react/menu'
import { Tooltip } from '~/components/Tooltip'
import {
type PackageGroup,
@@ -127,151 +122,155 @@ export function PackagePill({
{/* Advanced dropdown menu (main page only) */}
{showAdvancedMenu && (
-
onMenuOpenChange(mainPackage.name, open)
}
>
-
-
-
+
+
+
+ }
+ />
-
-
- Options
-
-
- {onLabelChange && (
-
-
-
-
+
+ Add Packages
+
+ )}
+
+
+
+
+
)}
diff --git a/src/components/shop/ProductDrawer.tsx b/src/components/shop/ProductDrawer.tsx
index 9d88c7c0c..a75e24d8a 100644
--- a/src/components/shop/ProductDrawer.tsx
+++ b/src/components/shop/ProductDrawer.tsx
@@ -206,7 +206,7 @@ export function ProductDrawer({
{allHandles.length > 1 ? (
<>
- {/* Anchored to the panel, not the viewport. Radix traps focus
+ {/* Anchored to the panel, not the viewport. Base UI traps focus
inside the panel, so viewport-level siblings would be
unreachable by keyboard — and it retires the third z-tier the
overlay audit flagged. */}
diff --git a/src/contexts/SearchContext.tsx b/src/contexts/SearchContext.tsx
index 68796d620..23d8c133d 100644
--- a/src/contexts/SearchContext.tsx
+++ b/src/contexts/SearchContext.tsx
@@ -18,7 +18,7 @@ interface SearchContextType {
askAiDock: (question: string) => void
clearAiDockAskRequest: (id: number) => void
closeSearch: () => void
- restoreSearchFocus: () => void
+ getSearchFocusTarget: () => HTMLElement | undefined
closeAiDock: () => void
cancelAiDockHoverClose: () => void
scheduleAiDockHoverClose: () => void
@@ -68,7 +68,7 @@ export function SearchProvider({
setIsOpen(true)
}, [isOpen])
- const restoreSearchFocus = React.useCallback(() => {
+ const getSearchFocusTarget = React.useCallback(() => {
const trigger = searchTriggerRef.current
searchTriggerRef.current = null
if (
@@ -76,16 +76,13 @@ export function SearchProvider({
trigger.getClientRects().length > 0 &&
!trigger.closest('[aria-hidden="true"], [inert]')
) {
- trigger.focus({ preventScroll: true })
- return
+ return trigger
}
const menuTrigger = document.querySelector(
'button[aria-controls="primary-mobile-menu"]',
)
- if (menuTrigger instanceof HTMLElement) {
- menuTrigger.focus({ preventScroll: true })
- }
+ return menuTrigger instanceof HTMLElement ? menuTrigger : undefined
}, [])
const openAiDock = React.useCallback(() => {
@@ -156,7 +153,7 @@ export function SearchProvider({
askAiDock,
clearAiDockAskRequest,
closeSearch,
- restoreSearchFocus,
+ getSearchFocusTarget,
closeAiDock,
cancelAiDockHoverClose,
scheduleAiDockHoverClose,
@@ -169,7 +166,7 @@ export function SearchProvider({
clearAiDockAskRequest,
closeAiDock,
closeSearch,
- restoreSearchFocus,
+ getSearchFocusTarget,
isAiDockDirty,
isAiDockOpen,
isOpen,
diff --git a/src/routes/ds.buttons.tsx b/src/routes/ds.buttons.tsx
index d90248302..db838fe48 100644
--- a/src/routes/ds.buttons.tsx
+++ b/src/routes/ds.buttons.tsx
@@ -351,11 +351,13 @@ function ButtonsPage() {
code={`
-
-
-
+
+
+
+ }
+ />
Deploy to production
Deploy a preview
@@ -368,15 +370,17 @@ function ButtonsPage() {
-
-
-
+
+
+
+ }
+ />
Deploy to production
Deploy a preview
diff --git a/src/routes/ds.cards.tsx b/src/routes/ds.cards.tsx
index 142362079..8238aea5e 100644
--- a/src/routes/ds.cards.tsx
+++ b/src/routes/ds.cards.tsx
@@ -158,7 +158,7 @@ function CardsPage() {
diff --git a/src/routes/ds.dialog.tsx b/src/routes/ds.dialog.tsx
index 4a1172972..9ea6897cf 100644
--- a/src/routes/ds.dialog.tsx
+++ b/src/routes/ds.dialog.tsx
@@ -27,7 +27,7 @@ export const Route = createFileRoute('/ds/dialog')({
meta: seo({
title: 'Dialog | TanStack Design System',
description:
- 'The centered modal dialog — Radix-backed, on the semantic token layer.',
+ 'The centered modal dialog — Base UI-backed, on the semantic token layer.',
}),
}),
})
@@ -116,7 +116,7 @@ function DialogPage() {
return (
…
-
-
-
+ Cancel
+ }
+ />
@@ -155,11 +157,13 @@ function DialogPage() {
-
-
-
+
+ Cancel
+
+ }
+ />
@@ -196,9 +200,7 @@ function DialogPage() {
-
-
-
+ Close} />
@@ -235,11 +237,13 @@ function DialogPage() {
))}
-
-
-
+
+ Decline
+
+ }
+ />
@@ -255,9 +259,11 @@ function DialogPage() {
code={`
-
-
-
+ Cancel
+ }
+ />
`}
@@ -272,11 +278,13 @@ function DialogPage() {
description="Are you sure you want to remove this user from the role? This cannot be undone."
/>
-
-
-
+
+ Cancel
+
+ }
+ />
@@ -440,7 +448,7 @@ function DialogPage() {
diff --git a/src/routes/ds.drawer.tsx b/src/routes/ds.drawer.tsx
index 0b6f3c80e..ce346bb4a 100644
--- a/src/routes/ds.drawer.tsx
+++ b/src/routes/ds.drawer.tsx
@@ -22,7 +22,7 @@ export const Route = createFileRoute('/ds/drawer')({
meta: seo({
title: 'Drawer | TanStack Design System',
description:
- 'The edge-anchored panel — right, left and bottom, on one Radix foundation.',
+ 'The edge-anchored panel — right, left and bottom, on one Base UI foundation.',
}),
}),
})
@@ -41,7 +41,7 @@ function DrawerPage() {
return (
-
-
-
+ Primary action}
+ />
@@ -318,9 +318,7 @@ function DrawerPage() {
Subtotal
$56.00
-
-
-
+ Checkout} />
@@ -334,7 +332,7 @@ function DrawerPage() {
{[
'The panel slides only — no fade. The scrim fades.',
- 'Exit animations play: Radix Presence waits for animationend before unmounting.',
+ 'Exit animations play: Base UI waits for the animation to finish before unmounting.',
'prefers-reduced-motion removes the movement but keeps the state change.',
'Bottom is centred with auto margins rather than a translate, so transform stays free for the slide — Tailwind v4 compiles -translate-x-1/2 to the independent translate property, which composes with transform rather than being replaced by it.',
].map((line) => (
diff --git a/src/routes/ds.dropdown.tsx b/src/routes/ds.dropdown.tsx
index b82d39f2b..4ae60dcd9 100644
--- a/src/routes/ds.dropdown.tsx
+++ b/src/routes/ds.dropdown.tsx
@@ -21,7 +21,7 @@ export const Route = createFileRoute('/ds/dropdown')({
head: () => ({
meta: seo({
title: 'Dropdown | TanStack Design System',
- description: 'The Radix-powered Dropdown menu.',
+ description: 'The Base UI-powered Dropdown menu.',
}),
}),
})
@@ -50,7 +50,7 @@ function DropdownPage() {
return (
-
-
-
+ Account }
+ />
Profile
Settings
@@ -70,11 +70,13 @@ function DropdownPage() {
`}
>
-
-
-
+
+ Account
+
+ }
+ />
Profile
@@ -103,11 +105,13 @@ function DropdownPage() {
`}
>
-
-
-
+
+ Pick a library
+
+ }
+ />
{SCROLL_ITEMS.map((label) => (
{label}
diff --git a/src/routes/ds.overlays.tsx b/src/routes/ds.overlays.tsx
index c27a91afd..a027316e5 100644
--- a/src/routes/ds.overlays.tsx
+++ b/src/routes/ds.overlays.tsx
@@ -109,7 +109,7 @@ function OverlayAuditPage() {
{s.name}
{s.base === 'hand-rolled' ? (
raw
@@ -126,7 +126,7 @@ function OverlayAuditPage() {
diff --git a/src/routes/ds.tabs.tsx b/src/routes/ds.tabs.tsx
index 943be1208..c498788e8 100644
--- a/src/routes/ds.tabs.tsx
+++ b/src/routes/ds.tabs.tsx
@@ -79,13 +79,15 @@ function SizeSelector({
const current = TAB_SIZES.find((s) => s.value === value) ?? TAB_SIZES[1]
return (
-
-
-
+
+ {current.label}
+ {current.px}px
+
+
+ }
+ />
{TAB_SIZES.map((s) => (
onChange(s.value)}>
diff --git a/src/routes/ds.takeover.tsx b/src/routes/ds.takeover.tsx
index 2de71a5e9..1b02e0613 100644
--- a/src/routes/ds.takeover.tsx
+++ b/src/routes/ds.takeover.tsx
@@ -143,7 +143,7 @@ function TakeoverPage() {
'No panel and no header bar. TakeoverTitle / TakeoverDescription go wherever the content wants them — visible or sr-only.',
'The content element is the scroll container, so a takeover never nests a second scrollbar.',
'Clicking the content’s own empty space dismisses. It routes through the same close button rather than a second dismissal path that could drift from it.',
- 'onInteractOutside is forwarded, for content that portals menus of its own and must not close when they are clicked.',
+ 'Dismissal is the caller’s to veto: content that portals menus of its own cancels the outside press from the root’s onOpenChange, so clicking one does not close the takeover.',
'The surface fades rather than slides: nothing is arriving from an edge, the whole surface is being replaced.',
].map((line) => (
diff --git a/src/styles/app.css b/src/styles/app.css
index c4c13edd1..fee58e738 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -187,13 +187,14 @@ html.theme-switching *::after {
}
/* ----------------------------------------------------------------- Dialog --
- Enter/exit motion for the DS Dialog, driven off Radix's data-state rather
+ Enter/exit motion for the DS Dialog, driven off Base UI's data-open /
+ data-closed rather
than utility classes. Written as real keyframes on purpose: the
`animate-in` / `fade-in-0` / `zoom-in-95` classes used elsewhere in this
codebase come from tailwindcss-animate, which is NOT installed — they match
no CSS rule and animate nothing. Timing reuses the existing motion tokens.
- Radix's Presence waits for animationend before unmounting, so the closed
+ Base UI waits for the animation to finish before unmounting, so the closed
state genuinely plays instead of being cut off.
The panel keyframes animate `transform` only. Tailwind v4's
@@ -239,19 +240,19 @@ html.theme-switching *::after {
}
}
-[data-ds-dialog-scrim][data-state='open'] {
+[data-ds-dialog-scrim][data-open] {
animation: dialog-scrim-in var(--motion-duration-fast)
var(--motion-ease-standard) both;
}
-[data-ds-dialog-scrim][data-state='closed'] {
+[data-ds-dialog-scrim][data-closed] {
animation: dialog-scrim-out var(--motion-duration-fast)
var(--motion-ease-standard) both;
}
-[data-ds-dialog-panel][data-state='open'] {
+[data-ds-dialog-panel][data-open] {
animation: dialog-panel-in var(--motion-duration-fast)
var(--motion-ease-standard) both;
}
-[data-ds-dialog-panel][data-state='closed'] {
+[data-ds-dialog-panel][data-closed] {
animation: dialog-panel-out var(--motion-duration-fast)
var(--motion-ease-standard) both;
}
@@ -270,8 +271,8 @@ html.theme-switching *::after {
`transform` carries scale/offset only, never a centring translate: Tailwind
v4 compiles `-translate-x-1/2` to the independent `translate` property,
which composes with `transform` rather than being replaced by it. That also
- leaves Radix's --radix-*-content-transform-origin free to govern where a
- popover grows from.
+ leaves Base UI's --transform-origin free to govern where a popover grows
+ from.
-------------------------------------------------------------------------- */
@keyframes ds-pop-in {
from {
@@ -294,17 +295,14 @@ html.theme-switching *::after {
}
}
-/* Radix-driven transient surfaces: tooltips, dropdown menus.
- Tooltip does not use `open` — it reports `delayed-open` when it appears
- after the hover delay and `instant-open` inside the skip-delay window, so
- all three have to be matched or tooltips silently never animate. */
-[data-ds-pop][data-state='open'],
-[data-ds-pop][data-state='delayed-open'],
-[data-ds-pop][data-state='instant-open'] {
+/* Transient surfaces: tooltips, dropdown menus. Base UI reports a single
+ `data-open` regardless of whether the tooltip appeared after the hover delay
+ or instantly inside the skip-delay window, so one selector covers both. */
+[data-ds-pop][data-open] {
animation: ds-pop-in var(--motion-duration-fast) var(--motion-ease-standard)
both;
}
-[data-ds-pop][data-state='closed'] {
+[data-ds-pop][data-closed] {
animation: ds-pop-out var(--motion-duration-fast) var(--motion-ease-standard)
both;
}
@@ -383,13 +381,13 @@ html.dark [data-ds-takeover-scrim='glass'] {
}
}
-[data-ds-takeover-scrim][data-state='open'],
-[data-ds-takeover-panel][data-state='open'] {
+[data-ds-takeover-scrim][data-open],
+[data-ds-takeover-panel][data-open] {
animation: takeover-in var(--motion-duration-fast) var(--motion-ease-standard)
both;
}
-[data-ds-takeover-scrim][data-state='closed'],
-[data-ds-takeover-panel][data-state='closed'] {
+[data-ds-takeover-scrim][data-closed],
+[data-ds-takeover-panel][data-closed] {
animation: takeover-out var(--motion-duration-fast)
var(--motion-ease-standard) both;
}
@@ -463,27 +461,27 @@ html.dark [data-ds-takeover-scrim='glass'] {
}
}
-[data-ds-drawer-panel][data-side='right'][data-state='open'] {
+[data-ds-drawer-panel][data-side='right'][data-open] {
animation: drawer-right-in var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-panel][data-side='right'][data-state='closed'] {
+[data-ds-drawer-panel][data-side='right'][data-closed] {
animation: drawer-right-out var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-panel][data-side='left'][data-state='open'] {
+[data-ds-drawer-panel][data-side='left'][data-open] {
animation: drawer-left-in var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-panel][data-side='left'][data-state='closed'] {
+[data-ds-drawer-panel][data-side='left'][data-closed] {
animation: drawer-left-out var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-panel][data-side='bottom'][data-state='open'] {
+[data-ds-drawer-panel][data-side='bottom'][data-open] {
animation: drawer-bottom-in var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-panel][data-side='bottom'][data-state='closed'] {
+[data-ds-drawer-panel][data-side='bottom'][data-closed] {
animation: drawer-bottom-out var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
@@ -512,11 +510,11 @@ html.dark [data-ds-takeover-scrim='glass'] {
}
}
-[data-ds-drawer-scrim][data-state='open'] {
+[data-ds-drawer-scrim][data-open] {
animation: dialog-scrim-in var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
-[data-ds-drawer-scrim][data-state='closed'] {
+[data-ds-drawer-scrim][data-closed] {
animation: dialog-scrim-out var(--motion-duration-sheet)
var(--motion-ease-sheet) both;
}
@@ -2823,7 +2821,7 @@ html:not(.dark) .library-landing-graphic [style*='drop-shadow'] {
animation: dropdown-in 150ms ease-out;
}
-.dropdown-content[data-state='closed'] {
+.dropdown-content[data-closed] {
animation: dropdown-out 100ms ease-in;
}
@@ -2868,11 +2866,11 @@ html:not(.dark) .library-landing-graphic [style*='drop-shadow'] {
}
}
-.search-modal-overlay[data-state='open'] {
+.search-modal-overlay[data-open] {
animation: search-modal-overlay-in 140ms ease-out both;
}
-.search-modal-overlay[data-state='closed'] {
+.search-modal-overlay[data-closed] {
animation: search-modal-overlay-out 120ms ease-in both;
}
@@ -2880,11 +2878,11 @@ html:not(.dark) .library-landing-graphic [style*='drop-shadow'] {
transform-origin: top center;
}
-.search-modal-content[data-state='open'] .search-modal-panel-transition {
+.search-modal-content[data-open] .search-modal-panel-transition {
animation: search-modal-panel-in 140ms ease-out both;
}
-.search-modal-content[data-state='closed'] .search-modal-panel-transition {
+.search-modal-content[data-closed] .search-modal-panel-transition {
animation: search-modal-panel-out 120ms ease-in both;
}
@@ -2936,19 +2934,19 @@ html:not(.dark) .library-landing-graphic [style*='drop-shadow'] {
}
}
-.cart-panel[data-state='open'] {
+.cart-panel[data-open] {
animation: cart-panel-in 200ms ease-out;
}
-.cart-panel[data-state='closed'] {
+.cart-panel[data-closed] {
animation: cart-panel-out 150ms ease-in;
}
-.cart-overlay[data-state='open'] {
+.cart-overlay[data-open] {
animation: cart-overlay-in 200ms ease-out;
}
-.cart-overlay[data-state='closed'] {
+.cart-overlay[data-closed] {
animation: cart-overlay-out 150ms ease-in;
}
diff --git a/src/ui/Tooltip.tsx b/src/ui/Tooltip.tsx
index 5d759704e..017223a63 100644
--- a/src/ui/Tooltip.tsx
+++ b/src/ui/Tooltip.tsx
@@ -1,9 +1,9 @@
import * as React from 'react'
-import * as TooltipPrimitive from '@radix-ui/react-tooltip'
+import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip'
import { twMerge } from 'tailwind-merge'
interface TooltipProps {
- children: React.ReactNode
+ children: React.ReactElement
content: React.ReactNode
side?: 'top' | 'right' | 'bottom' | 'left'
align?: 'start' | 'center' | 'end'
@@ -24,28 +24,25 @@ export function Tooltip({
}
return (
-
-
- {children}
-
-
+
+
+
+
{content}
-
-
-
-
-
+
+
+
+
+
)
}