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
We would love to bring this functionality in our custom components built on top of the system, using breakpoints defined in the theme as well as the same API.
Upon investigation on how some @mui/material components are built, I can see some functions are imported from @mui/system to help accomplish this.
Documentation and official support of using these exported utils from @mui/system would help us greatly, instead of building our own solution. The unstable_ prefix also worries me if we were to start using some of these utils now.
Examples 🌈
It would allow us to build custom components with responsive props that respect the breakpoints in the theme with ease.
Nicktho
changed the title
Official expose support for custom component props to use breakpoints via @mui/system
Official support for custom component props to be responsive via @mui/system
Nov 24, 2021
hbjORbj
changed the title
Official support for custom component props to be responsive via @mui/system
Official support for unstable_breakpoints-related functions in @mui/system
Nov 24, 2021
mbrookes
changed the title
Official support for unstable_breakpoints-related functions in @mui/system
[system] Official support for unstable_breakpoints-related functionsNov 28, 2021
mbrookes
changed the title
[system] Official support for unstable_breakpoints-related functions
[system] Official support for unstable_breakpoints-related functions
Nov 28, 2021
I totally agree with this one and this is a major letdown that there's no way to use these utilities properly yet for building custom components.
If the functions were at least exported with their current "unstable_" prefix that would be one thing, however right now they are completely invisible to any typescript project which makes this even more cumbersome.
Duplicates
Latest version
Summary 💡
Hello!
We've decided to go ahead and use
@mui/system
as a base to build our custom component library.One feature in particular we love is the responsive features of system props, for example:
We would love to bring this functionality in our custom components built on top of the system, using breakpoints defined in the theme as well as the same API.
Upon investigation on how some
@mui/material
components are built, I can see some functions are imported from@mui/system
to help accomplish this.For example, to support the responsive
direction
prop on theStack
component, utilities such ashandleBreakpoints
andunstable_resolveBreakpointValues
are used: https://github.com/mui-org/material-ui/blob/master/packages/mui-material/src/Stack/Stack.js#L47Documentation and official support of using these exported utils from
@mui/system
would help us greatly, instead of building our own solution. Theunstable_
prefix also worries me if we were to start using some of these utils now.Examples 🌈
It would allow us to build custom components with responsive props that respect the breakpoints in the theme with ease.
Motivation 🔦
Without official support of these utils and documentation, we would either:
unstable_
prefixed exports.The text was updated successfully, but these errors were encountered: