[material-ui][Text Field] Right-to-left icon issue #41418
Labels
component: text field
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for author
Issue with insufficient information
Related page
https://mui.com/material-ui/customization/right-to-left/
Kind of issue
Unclear explanations
Issue description
I had an issue whie trying to style an input field using TextField.
when I tried to add an icon to the field it appears always on the right because i am using rtl direction in my react app
I tried to adjust it whith styling , when I set the margin to the left the input field disappeared because the icon took all the space
this document didnt show how to fix that
Context
I had an issue whie trying to style an input field using TextField.
when I tried to add an icon to the field it appears always on the right because i am using rtl direction in my react app
I tried to adjust it whith styling , when I set the margin to the left the input field disappeared because the icon took all the space
this document didnt show how to fix that
<TextField
fullWidth
label="Email"
variant="outlined"
size="small"
dir="rtl" // Right-to-left direction
style={{ marginBottom: 10 }}
InputProps={{
startAdornment: <EmailIcon style={{ marginLeft: 5 }} />,
}}
Search keywords: Forms, RTL, icons, textfield
The text was updated successfully, but these errors were encountered: