Complete the code to add a blue ring around the button when it is focused.
<button class="focus:ring-4 focus:ring-[1]-500 focus:outline-none">Click me</button>
focus: prefix.The focus:ring-4 focus:ring-blue-500 utilities add a blue ring of width 4 when the button is focused. focus:outline-none removes the default outline.
Complete the code to remove the default outline and add a green ring on focus.
<input type="text" class="focus:ring-2 focus:ring-[1]-500 focus:outline-none" placeholder="Enter text">
The class focus:outline-none removes the default outline. focus:ring-2 focus:ring-green-500 adds a green ring of width 2 on focus.
Fix the error in the code to correctly apply a red ring on focus with width 3.
<textarea class="focus:ring-[1] focus:ring-red-500 focus:outline-none"></textarea>
The correct ring width is 3. Use focus:ring-3 focus:ring-red-500 to set a red ring of width 3 on focus. focus:outline-none removes the default outline.
Fill both blanks to create a button with a yellow ring of width 6 on focus and no default outline.
<button class="focus:ring-[2] focus:ring-[1]-500 focus:outline-none">Submit</button>
Using focus:ring-6 focus:ring-yellow-500 adds a yellow ring with width 6 on focus. The focus:outline-none removes the default outline.
Fill all three blanks to create an input with a purple ring of width 4 on focus, no outline, and a smooth transition.
<input type="text" class="focus:ring-[2] focus:ring-[1]-500 focus:outline-[3] transition duration-300" placeholder="Name">
The classes focus:ring-4 focus:ring-purple-500 add a purple ring with width 4 on focus. focus:outline-none removes the default outline. The transition duration-300 adds a smooth 300ms transition effect.