Skip to content

[Select][material-next] Add Select component #38972

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

Open
1 of 8 tasks
mj12albert opened this issue Sep 14, 2023 · 3 comments
Open
1 of 8 tasks

[Select][material-next] Add Select component #38972

mj12albert opened this issue Sep 14, 2023 · 3 comments
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! design: material you on hold There is a blocker, we need to wait

Comments

@mj12albert
Copy link
Member

mj12albert commented Sep 14, 2023

Part of #29345

Material You specs: https://m3.material.io/components/menus/specs

Migration Guide checklist

  • Copy component files from material (v5) to material-next, including tests, types, and utils: PR: #39188
  • Migrate component to Typescript
  • Remove deprecated components and componentsProps props, leaving only slots and slotProps
  • Drop support for ThemeProvider in favor of CssVarsProvider
  • Refactor component to use Base UI’s useSelect: WIP #39591
  • Implement Material You design specs
  • Add component playground to v5 docs
  • Refactor styles to use component CSS Variables

Other features & related tasks

@mj12albert mj12albert added component: select This is the name of the generic UI component, not the React module! design: material you labels Sep 14, 2023
@mj12albert

This comment was marked as resolved.

@mj12albert mj12albert changed the title [🚧DRAFT][Select][material-next] Add Select component [Select][material-next] Add Select component Sep 14, 2023
@mj12albert
Copy link
Member Author

mj12albert commented Sep 14, 2023

I think the v6 Select will still depend on InputBase (and therefore also depends on FormControl) for the select trigger, since internally it uses OutlinedInput (or filled) to share styles with text fields:

// heavily simplified version of what https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Select/Select.js
// would look like in v6
function Select() {
  return (
    <OutlinedInput // it's essentially `InputBase` with a layer of styles
      slots={{
        input: SelectInput, // most of the refactoring with useSelect would happen here
      }}
      slotProps={{
        input: {
          children,
          multiple,
          // more props
        },
      }}
    />
  );
}

@DiegoAndai
Copy link
Member

@mj12albert I agree with both your points 🙌🏼 This would mean trying to get as close as possible to Joy's implementation (which uses Option and ListBox components) without breaking changes 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! design: material you on hold There is a blocker, we need to wait
Projects
Status: In progress
Status: In progress
Development

No branches or pull requests

3 participants