Fix hydration mismatch in progress bars on non-English browsers

Base UI formats aria-valuetext with the runtime locale (server: "50%", German browser: "50 %"). Pin the Progress wrapper to en-US.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 20:26:56 +02:00
1 parent 6dc9527682
commit 5211ec9064
1 file changed
+4
+4
View File
@@ -7,11 +7,15 @@ function Progress({
className,
children,
value,
// Fixed locale: the default (runtime locale) formats aria-valuetext differently on the server
// and in e.g. a German browser ("50%" vs "50 %"), which breaks hydration.
locale = "en-US",
...props
}: ProgressPrimitive.Root.Props) {
return (
<ProgressPrimitive.Root
value={value}
locale={locale}
data-slot="progress"
className={cn("flex flex-wrap gap-3", className)}
{...props}