How should i style MUI components? - reactjs

i want to style a TextField component, but i'm having a really hard time with it. I saw a few ways to do it, but i don't really get it. Also, apprently the makeStyles is deprecated, so i'm really lost here.
I have this TextField
And i want the outline border to be white and the input color. When i focus and click on it, it works fine. As for the input, i styled it with inputLabelProps with color:'white', but when i click on it doesn't change to the same color as the border.
Thanks in advance

Related

How to remove borderColor of NativeBase TextArea?

I am a creating a screen where a user can input any text without constraints.
I tried using NativeBase TextArea and it should work. But when pressed, the border changes color. My expected behavior is that the TextArea's borders should never display any color.
Here is a screenshot of my screen:
Here is a code snippet in creating the textArea:
<TextArea
borderColor="transparent"
h={'98%'}
textAlignVertical="top"
placeholder="| Add Notes"
/>
I tried changing borderColor to 'transparent' but it seems like it is not what I am looking for. That property only changes the borderColor when it is not active.
Maybe there is a way to remove validation of the textArea so that borderColor will not update? Or is there a more suitable property for this kind of feature?
did u try
borderWidth:0,
not sure if it can work tho

Material Ui TextField remove bottom border

i am using material ui for my project and this is my textField
text field reality
as you can see there is an bottom border underline it, but i want to remove it completely, previously i usually use border: "0px" but i dont know how to customize it, this is what i want
text field expectation
thank for your time to help me out, highly appreciate your effort, hope you have a good day
you can edit in this codesandbox link: codesanboxlink
for this case you can import InputBase from material-ui
import InputBase from '#material-ui/core/InputBase';
you can see your example at codesandbox codesandboxlink

Getting Tab Component To Consume UIID

I have tried everything possible to style my Tab component but its not getting reflected. I want my selected Tab to have a white background and red foreground. Even though I have edited Style using Theme designer. Its still doesnt work. I read the docs and I am aware Tab component is now like a toggle. I did the suggestion to setTabUIID(null) but still cant get it to work. How can this be done.
You don't need the setTabUIID(null); just make sure to style both selected and unselected styles. Also override the Border to Empty if you don't define a border.

Trouble changing background color of TextField in Codename One

I just started building my first App with Codename One and I'm having quite some trouble. :-)
I cant change the background color of a TextField, I changed everything in the Theme and named it "TextField". At the Color tab I changed the background color and set Transparency to 255. Since the Component is named TextField, shouldnt the style be applied automatically when I make a new TextField?
I also tried to set the UIID manually to "TextField", which didn't help either.
Am I missing something?
Kind regards,
Max
The way backgrounds work in Codename One is this:
Border is applied first
Then image
Then gradient
Then color
TextField and other components such as Button etc. often have a default border derived from the theme.
Switch to the Border tab, click derive then click the ... button and select empty.

Codename One - Layout issue

I've a GUI built app and I set many Icon images in the code for some components.
The thing is I've made sure all "padding" and "margin" values are the same for the different states of the components (unselected, pressed, etc) but when I try to input data into the TextFields, it seems like the dimensions of some components change without notice and they completely mess with my layout.
Even sometimes some of the icons partially disappear. Please see the following screenshot of before and after text input, where the Container and TextFields shrink
I really don't know what else I can do. I have tried many things, but stil the same outcome. Please help.
You need to make the container housing all this components scrollable.
Use Millimeters for your TextField padding and margin, don't use Screen Percentage. From the image in the images you posted, 2mm top and bottom and 1mm left and right would be suitable.
If the components having those icons are pressable like a button, be sure to set their pressedIcon to the same icon.
Lastly, style your TextField Unselected state and copy this to Selected and Pressed states, to avoid erroneous styling.

Resources