You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds operable React Storybook controls for the native properties exposed by Form. Both the default and AI-label stories now support a custom class name, accessible label, and submit action while preventing Storybook submissions from navigating away.
Changelog
New
Added controls for the Form class name and accessible label.
Added a submit action to both React Form stories.
Changed
Updated the default Form story to pass Storybook args to the rendered form.
Updated the AI-label story to apply Form controls to both standard and fluid forms.
Prevented story form submissions from triggering page navigation.
Preserved all existing AI-label and child validation controls.
Removed
None.
Testing / Reviewing
Use the repository Node version and start React Storybook:
nvm use
yarn workspace @carbon/react storybook
Open Components/Form.
In Default, verify the class-name control updates the form class and the accessible-label control updates the form’s accessible name.
Submit the form and confirm onSubmit appears in Actions without leaving the story.
Open With AI label and repeat the Form checks for both the standard and fluid forms.
Confirm the existing AI-label, disabled, invalid, and warning controls still work.
The Web Components cds-form element has no configurable component properties. Its default story therefore has no meaningful controls to add, while its AI-label story already exposes working child-state controls.
Test Screenshots
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Reviewed every line of the diff
Updated documentation and Storybook examples
Wrote passing tests that cover this change
Addressed any impact on accessibility (a11y)
Tested for cross-browser consistency
Validated that this code is ready for review and status checks should pass
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.59%. Comparing base (cf4d689) to head (fb7462b). ⚠️ Report is 19 commits behind head on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20924
Adds operable React Storybook controls for the native properties exposed by
Form. Both the default and AI-label stories now support a custom class name, accessible label, and submit action while preventing Storybook submissions from navigating away.Changelog
New
Changed
Removed
Testing / Reviewing
Use the repository Node version and start React Storybook:
Open
Components/Form.In Default, verify the class-name control updates the form class and the accessible-label control updates the form’s accessible name.
Submit the form and confirm
onSubmitappears in Actions without leaving the story.Open With AI label and repeat the Form checks for both the standard and fluid forms.
Confirm the existing AI-label, disabled, invalid, and warning controls still work.
Run the focused checks:
The Web Components
cds-formelement has no configurable component properties. Its default story therefore has no meaningful controls to add, while its AI-label story already exposes working child-state controls.Test Screenshots

PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Tested for cross-browser consistencyMore details can be found in the [pull request guide](https://github.com/carbon-design-system/carbon/blob/main/docs/guides/reviewing-pull-requests.md).