Tailwind CSS Classes

Tailwind CSS class .focus-within

    <form>
        <div class="text-gray-400 focus-within:text-green-600 focus-within:underline">
            Enter your name:
            <input class="ml-2 px-4 py-2 border rounded" type="text" placeholder="Name">
        </div>
    </form>

Preview

Check .focus-within in a real project

Click one of the examples listed below to open the Shuffle Visual Editor with the UI library that uses the selected component.

More Tailwind CSS classes in Forms category

© 2024 Shuffle. All rights reserved.