The focus:border-blue-500 class changes the border color only when the input is focused. Other options apply on hover, active state, or always.
<form class="?"> <input type="text" placeholder="Name" /> <input type="email" placeholder="Email" /> <input type="password" placeholder="Password" /> </form>
flex flex-col gap-4 stacks children vertically with a gap of 1rem (4). Other options either arrange horizontally or in a grid.
<input type="text" ? />The aria-label attribute provides an accessible name for the input, helping screen readers announce its purpose. tabindex="-1" removes it from keyboard navigation, autocomplete and spellcheck do not affect screen reader labeling.
<input type="text" disabled class="?" />
The disabled: prefix applies styles only when the input is disabled. Option B applies both background and cursor styles conditionally. Other options apply styles always or partially.
<input type="text" placeholder="Username" class="border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500 w-full max-w-sm" />
What will the user see when the input is focused?
<input type="text" placeholder="Username" class="border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500 w-full max-w-sm" />
The input has a gray border and rounded corners. On focus, the outline is removed and a 2px indigo ring appears around it. It is full width but limited to a max width of small size.