Styling Input Field
When i try to redefine css in Input component, it style only the outer element and i cannot access to the inner ones
i.e.
i want to define the area inside the input field in black, and i create a custom css to do that
const myStyle ={
backgroundColor:"black",
borderRadius:"5px"
}
and now i pass the Input item as component into the field
<Field
key={key}
className="rainbow-m-top_small"
component={(props) => {
return (
<Input style={myStyle} {...props}/>
)
}}
name={field.column_name}
label={field.column_name}
type="text"
/>
with the custom style.
That's the result.

but i want to make black the area inside the styled.div below "Label".

is there a way to do that?
We are working on providing a theming solution for customization. Right now you could make introspection as: in app.js:
import { Input } from 'react-rainbow-components';
import './styles.css';
<Input className="my-custom-class" label="My Input" />
in styles.css:
.my-custom-class input {
background-color: black;
}
But keep in mind that this is a workaround and it is bad practice. Stay tuned for future releases because theming will be the right solution for this case.
Hi guys, I would like to move the label of the input to the left. Is there any way to do this through theming?
Hi guys, I would like to move the label of the input to the left. Is there any way to do this through theming?
Hi, @guidogr95 you can use the labelAlignment="left" prop
We have an example that you can review
https://react-rainbow.io/#!/Input/27