-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[joy-ui][Stepper] Add new Stepper
components
#39688
Conversation
Netlify deploy preview@mui/joy: parsed: +1.94% , gzip: +1.46% Bundle size reportDetails of bundle changes (Toolpad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @siriwatknp this looks fantastic! A great addition to our catalog indeed.
I took the liberty to add a few adjustments to the component, to make it a bit lighter and denser to be more consistent with our current approach to sizes—I also added a few visual tweaks to the demos afterward.
Design-wise, it looks great! 🚀 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things I noticed:
- Using
<Step oriention="vertical" />
in vertical stepper does not have any effect. Is this expected? - On the playground, setting the stepper's orientation prop does not show any change in the code snippet
The customization demos look awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I pushed few improvements. We can resolve the design comment in a follow up.
@@ -0,0 +1,107 @@ | |||
--- | |||
productId: material-ui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick fix d2cd42d. This was flagged in the SEO crawl. Bug: https://deploy-preview-39688--material-ui.netlify.app/joy-ui/react-stepper/#api
closes #38641
🖥️ Preview: https://deploy-preview-39688--material-ui.netlify.app/joy-ui/react-stepper/
Refs
Composition structure
Joy Steppers aims for 1-to-1 DOM mapping with an ordered list as explained in this article. So far, just 4 components that make sense to me (Material UI and Chakra UI have too much components):
ol
)li
)*For connector, Joy UI uses
::after
of each step and Typography for labels and texts which reduces a lot of components to maintain.Technical decisions
active
,completed
, andactive
are just classes without extra styles like Material UI to let developers own the customization.Customization improvements
Since Joy UI relies on global variant and CSS variables for customization of the active and completed states, it is more flexible and easier to customize.
By providing low-level customization, we can create various stepper designs and let developers copy the one closest to their use case.
Benchmark
Lines of code between Material UI and Joy UI