0
0
Tailwindmarkup~5 mins

Button component patterns in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a primary button in UI design?
A primary button is the main action button on a page. It usually stands out with a strong color to guide users to the most important action.
Click to reveal answer
beginner
How do you create a button with Tailwind CSS that looks disabled?
Use classes like opacity-50 and cursor-not-allowed to show the button is disabled.
Click to reveal answer
beginner
Why use semantic <button> elements instead of <div> for buttons?
Semantic <button> elements are accessible by default. They support keyboard navigation and screen readers, improving usability for all users.
Click to reveal answer
beginner
What Tailwind classes help create a button with a hover effect?
Use classes like hover:bg-blue-700 or hover:text-white to change background or text color when the user hovers over the button.
Click to reveal answer
intermediate
How can you make a button responsive using Tailwind CSS?
Use responsive prefixes like sm:, md:, lg: to adjust padding, font size, or width on different screen sizes.
Click to reveal answer
Which HTML element is best for creating accessible buttons?
A<div>
B<button>
C<span>
D<a>
What Tailwind class would you use to make a button's background blue on hover?
Ahover:text-blue-500
Btext-blue-500
Cbg-blue-500
Dhover:bg-blue-500
How do you visually indicate a disabled button in Tailwind CSS?
Atext-red-500
Bhover:bg-gray-500
Copacity-50 cursor-not-allowed
Dbg-green-500
Which Tailwind class helps make a button's text bold?
Afont-bold
Btext-bold
Cfont-light
Dtext-lg
To make a button wider on medium screens and above, which prefix would you use?
Amd:
Bsm:
Clg:
Dxl:
Explain how to build an accessible and visually clear button using Tailwind CSS.
Think about accessibility, visual feedback, and states.
You got /4 concepts.
    Describe how responsive design affects button styling in Tailwind CSS.
    Consider how buttons look and behave on phones vs desktops.
    You got /3 concepts.