Skip to content
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][Select] Floating label Select #42012

Open
atillaaliyev opened this issue Apr 24, 2024 · 4 comments
Open

[joy-ui][Select] Floating label Select #42012

atillaaliyev opened this issue Apr 24, 2024 · 4 comments
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@atillaaliyev
Copy link

atillaaliyev commented Apr 24, 2024

Summary

I want to design floating label select but i dont know what is the right solution (access to button or root slot of Select) .If you check below example , the label floats but animation effect doesn't work. Do you have any example or documentation plan?

Examples

https://codesandbox.io/p/sandbox/select-floating-label-8lqxly

Motivation

https://mui.com/joy-ui/react-input/#floating-label

Search keywords: select input slot

@atillaaliyev atillaaliyev added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 24, 2024
@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 24, 2024
@atillaaliyev atillaaliyev reopened this Apr 24, 2024
@atillaaliyev atillaaliyev changed the title [joy-ui][Select] Access input slot [joy-ui][Select] Floating label Select Apr 24, 2024
@atillaaliyev atillaaliyev reopened this Apr 24, 2024
@zannager zannager added component: select This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 24, 2024
@yamahmed
Copy link

I just checked the code provided here https://mui.com/joy-ui/react-input/#floating-label and i suggest modifying 3 things :
1)Add a transition for the opacity of the placeholder text in the StyledInput component.
2) Adjust the label color on focus to match the focused highlight color.
3)Use theme palette for the label color and theme typography for the font weight in the StyledLabel component.

i'll provide a screenshot of where to modify:

Capture d’écran 2024-04-28 142802

@atillaaliyev
Copy link
Author

I just checked the code provided here https://mui.com/joy-ui/react-input/#floating-label and i suggest modifying 3 things : 1)Add a transition for the opacity of the placeholder text in the StyledInput component. 2) Adjust the label color on focus to match the focused highlight color. 3)Use theme palette for the label color and theme typography for the font weight in the StyledLabel component.

i'll provide a screenshot of where to modify:

Capture d’écran 2024-04-28 142802

I haven't StyledInput component, because mui joy uses button instead of input or select. But I tried anyway , it didn't work.

@yamahmed
Copy link

What if we need to adjust the styling component accordingly to a button instead of a Select or input component?
i think this will work

@atillaaliyev
Copy link
Author

atillaaliyev commented Apr 29, 2024

Could you send me codesandbox link after do it? Because, it didn't work.

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! package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants