Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
30
rated 0 times [  37] [ 7]  / answers: 1 / hits: 5549  / 2 Years ago, fri, november 25, 2022, 12:00:00

I am using Tailwind css with my react application. I am creating a form using tailwind and want to change focus border color of my input text box in teal which is blue.





function App() {
return (
<div className="App">
<main className="h-screen flex items-center justify-center">
<form className="bg-white flex rounded-lg w-1/2">
<div className= "flex-1 text-gray-700 p-20">
<h1 className="text-3xl pb-2">Lets Get Started</h1>
<p className="text-lg text-gray-500">We are herre to get you about our sdas no bonsdcbeagufpi feqwifheqfwe</p>

<div className='mt-6'>
<div className="pb-4">
<label
className="block text-sm pb-2"
htmlFor="name"
>Name
</label>
<input
className="border-2 border-gray-500 p-2 rounded-md w-1/2 focus:border-teal-500"
type="text" name="name" placeholder='Enter Your Name' />

</div>
</div>


</div>
<div> </div>

</form>
</main>
</div>
);
}

export default App;


I did change teal color with focus:boreder-teal-500 but it is not chaging teal color when I focus or click on my text box.


More From » html

 Answers
2

you can also do it directly with tailwind:


<div className="focus:border-blue border-2 border-solid" />

[#10] Saturday, August 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mary

Total Points: 432
Total Questions: 98
Total Answers: 98

Location: Luxembourg
Member since Tue, Jan 25, 2022
2 Years ago
;