Complete the code to disable the button using Tailwind CSS.
<button class="bg-blue-500 text-white py-2 px-4 rounded [1]" disabled>Click me</button>
Using opacity-50 makes the button look faded, and cursor-not-allowed changes the cursor to show it's disabled.
Complete the code to apply a gray background when the button is disabled.
<button class="py-2 px-4 rounded bg-blue-600 text-white disabled:[1]" disabled>Submit</button>
disabled: prefix.The disabled:bg-gray-400 class applies a gray background only when the button is disabled.
Fix the error in the code to correctly style the disabled input field.
<input type="text" class="border p-2 rounded [1]" disabled />
The correct Tailwind prefix for disabled state is disabled:. It applies styles only when the element is disabled.
Fill both blanks to style a disabled button with faded text and no pointer events.
<button class="bg-green-500 text-white py-2 px-4 rounded disabled:[1] disabled:[2]" disabled>Save</button>
opacity-40 makes the button look faded, and pointer-events-none disables mouse interactions when disabled.
Fill all three blanks to style a disabled input with gray border, light background, and no text selection.
<input type="text" class="border-2 rounded p-2 disabled:[1] disabled:[2] disabled:[3]" disabled />
When disabled, the input has a gray border (border-gray-400), a light gray background (bg-gray-200), and text selection is disabled (select-none).