) {
const { enumOptions, enumDisabled, emptyValue: optEmptyValue } = options;
@@ -54,6 +55,8 @@ export default function SelectWidget<
disabled: Array.isArray(enumDisabled) && enumDisabled.includes(value),
}));
+ const cnClassName = cn({ 'border-destructive': rawErrors.length > 0 }, className);
+
return (
{!multiple ? (
@@ -67,7 +70,7 @@ export default function SelectWidget<
disabled={disabled || readonly}
required={required}
placeholder={placeholder}
- className={cn({ 'border-destructive': rawErrors.length > 0 })}
+ className={cnClassName}
onFocus={_onFancyFocus}
onBlur={_onFancyBlur}
ariaDescribedby={ariaDescribedByIds(id)}
@@ -78,7 +81,7 @@ export default function SelectWidget<
autoFocus={autofocus}
disabled={disabled || readonly}
multiple
- className={rawErrors.length > 0 ? 'border-destructive' : ''}
+ className={cnClassName}
items={items}
selected={value}
onValueChange={(values) => {
diff --git a/packages/shadcn/src/SubmitButton/SubmitButton.tsx b/packages/shadcn/src/SubmitButton/SubmitButton.tsx
index ab39a7267f..3ac76219a6 100644
--- a/packages/shadcn/src/SubmitButton/SubmitButton.tsx
+++ b/packages/shadcn/src/SubmitButton/SubmitButton.tsx
@@ -1,6 +1,7 @@
import { FormContextType, getSubmitButtonOptions, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';
import { Button } from '../components/ui/button';
+import { cn } from '../lib/utils';
/** The `SubmitButton` renders a button that represent the `Submit` action on a form
*/
@@ -13,7 +14,7 @@ export default function SubmitButton
-
diff --git a/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx b/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx
index 0d417386d8..5a9bec55dc 100644
--- a/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx
+++ b/packages/shadcn/src/TextareaWidget/TextareaWidget.tsx
@@ -31,6 +31,7 @@ export default function TextareaWidget<
onFocus,
onChange,
options,
+ className,
}: CustomWidgetProps) {
const _onChange = ({ target: { value } }: ChangeEvent) =>
onChange(value === '' ? options.emptyValue : value);
@@ -53,6 +54,7 @@ export default function TextareaWidget<
onBlur={_onBlur}
onFocus={_onFocus}
aria-describedby={ariaDescribedByIds(id)}
+ className={className}
/>
);
From d721fd92ab723b28e28dcf77aa6fe6074a202d43 Mon Sep 17 00:00:00 2001
From: tphung
Date: Fri, 22 Aug 2025 22:51:35 +0700
Subject: [PATCH 3/5] test: update test snapshots to cover for missing class on
renders for updated elements
---
.../test/__snapshots__/Array.test.tsx.snap | 20 +++++++++----------
.../test/__snapshots__/Object.test.tsx.snap | 18 ++++++++---------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/packages/shadcn/test/__snapshots__/Array.test.tsx.snap b/packages/shadcn/test/__snapshots__/Array.test.tsx.snap
index 6ad8e30f01..dbeedcd212 100644
--- a/packages/shadcn/test/__snapshots__/Array.test.tsx.snap
+++ b/packages/shadcn/test/__snapshots__/Array.test.tsx.snap
@@ -29,7 +29,7 @@ exports[`array fields array 1`] = `
className="p-0 m-0"
>
Date: Fri, 22 Aug 2025 22:54:50 +0700
Subject: [PATCH 4/5] chore: Update changelog with new changes
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0915ddb19d..2de4c314b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -58,11 +58,13 @@ should change the heading of the (upcoming) version to include a major version b
## @rjsf/shadcn
+- Update `README.md` with picture of the theme!
- Bump `@shadcn/ui` components to use latest version from https://ui.shadcn.com/
- Bump `tailwindcss` to using v4 and css compiling process to use latest `@tailwindcss/cli`
- Remove `postcss` due to new Oxide compiler of tailwindcss
- Update playground themes with `default`, `Amethyst Haze`, `Caffeine`, `Claude`, `Neo Brutalism`, `Pastel Dreams`, `Soft Pop`, `Twitter`, `Vercel`
- Radio widget labels are now accessible and can be clicked on to select the associated option.
+- Allow passing `className` props to `AddButton`, `BaseInputTemplate`, `CheckboxWidget`, `CheckboxesWidget`, `RadioWidget`, `SelectWidget`, `SubmitButton`, `TextareaWidget` for extra Tailwind CSS customization through `ui:className`
## @rjsf/utils
From 8f7494edf62235bc344c3e6f68f4f5744d3c20b6 Mon Sep 17 00:00:00 2001
From: Heath C <51679588+heath-freenome@users.noreply.github.com>
Date: Fri, 22 Aug 2025 17:14:19 -0700
Subject: [PATCH 5/5] Update CHANGELOG.md
---
CHANGELOG.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2de4c314b1..6aadd8c793 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,13 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.
-->
+# 6.0.0-beta.15
+
+## @rjsf/shadcn
+
+- Update `README.md` with picture of the theme!
+- Allow passing `className` props to `AddButton`, `BaseInputTemplate`, `CheckboxWidget`, `CheckboxesWidget`, `RadioWidget`, `SelectWidget`, `SubmitButton`, `TextareaWidget` for extra Tailwind CSS customization through `ui:className`
+
# 6.0.0-beta.14
## @rjsf/core
@@ -58,13 +65,11 @@ should change the heading of the (upcoming) version to include a major version b
## @rjsf/shadcn
-- Update `README.md` with picture of the theme!
- Bump `@shadcn/ui` components to use latest version from https://ui.shadcn.com/
- Bump `tailwindcss` to using v4 and css compiling process to use latest `@tailwindcss/cli`
- Remove `postcss` due to new Oxide compiler of tailwindcss
- Update playground themes with `default`, `Amethyst Haze`, `Caffeine`, `Claude`, `Neo Brutalism`, `Pastel Dreams`, `Soft Pop`, `Twitter`, `Vercel`
- Radio widget labels are now accessible and can be clicked on to select the associated option.
-- Allow passing `className` props to `AddButton`, `BaseInputTemplate`, `CheckboxWidget`, `CheckboxesWidget`, `RadioWidget`, `SelectWidget`, `SubmitButton`, `TextareaWidget` for extra Tailwind CSS customization through `ui:className`
## @rjsf/utils