Improve Polaris component examples - Batch 1 (MoneyField, PasswordField, Select, Switch, URLField)#3903
Draft
Improve Polaris component examples - Batch 1 (MoneyField, PasswordField, Select, Switch, URLField)#3903
Conversation
added 7 commits
February 19, 2026 18:41
The 'Set minimum and maximum amounts' static example wasn't useful—min/max props don't do anything visible without JavaScript validation. The 'Validate input in real time' example already demonstrates min/max with working validation, making the static example redundant.
Show details prop to communicate min/max constraints to users
Merged into default example description since both showed basic switch usage
- Renamed 'Collect multiple settings' to 'Submit settings in a form' - Renamed 'Create a settings panel' to 'Apply settings immediately' - Moved examples next to each other for easy comparison - Updated descriptions to clarify when to use each pattern
URLField: - Remove 'Add a label and placeholder' (covered by default) - Update default description to mention label and placeholder Switch: - Add 'multiple' to form/immediate settings titles for clarity
…witch, URLField Apply consistent 3-sentence pattern to all example descriptions: - Purpose statement explaining why to use this pattern - "This example shows..." describing specific implementation - "Click to interact with the preview." CTA Also corrected descriptions to accurately match example code.
- Remove "Click to interact with the preview." from all descriptions - Collapse examples to HTML-only (remove JSX tabs) - Change language to 'preview' for interactive HTML examples - Keep JSX-only interactive examples (validation, state tracking) - Delete 28 unused JSX example files
6d100e8 to
f2b92e3
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Improves documentation examples for 5 Polaris form input components with action-oriented titles, clearer descriptions, and interactive event handling examples.
Components
MoneyField, PasswordField, Select, Switch, URLField
Changes
Titles & Descriptions
New Interactive Examples
password-strength-validation.jsx- real-time strength checkinghandle-selection-change.jsx- dynamic UI updates on selectiontoggle-with-feedback.jsx- track and display toggle statevalidate-url-input.jsx- real-time URL validationRemoved Redundant Examples
Clarified Use Cases
detailsprop to constraints example