You can check out the "Responsive Design" section of the docs:

https://tailwindcss.com/docs/responsive-design

By default, Tailwind uses a "mobile-first" approach. So classes without prefixes apply to the smallest screen size.

To use different classes for different screen sizes, just add the relevant class name "md", "lg", "xl" and so on, like so: xl:px-8, lg:px-5, md: px-2

Answer from ae_bu on Stack Overflow
🌐
Tailwind CSS
tailwindcss.com › docs › responsive-design
Responsive design - Core concepts - Tailwind CSS
We've only used one breakpoint in this example, but you could easily customize this component at other sizes using the sm, lg, xl, or 2xl responsive prefixes as well. Tailwind uses a mobile-first breakpoint system, similar to what you might be used to in other frameworks like Bootstrap.
🌐
daisyUI
daisyui.com › components › button
Tailwind Button Component – daisyUI
<button class="$$btn $$btn-xs sm:$$btn-sm md:$$btn-md lg:$$btn-lg xl:$$btn-xl">Responsive</button> <button class="$$btn $$btn-xs sm:$$btn-sm md:$$btn-md lg:$$btn-lg xl:$$btn-xl">Responsive</button> <button class="$$btn $$btn-xs sm:$$btn-sm md:$$btn-md lg:$$btn-lg xl:$$btn-xl">Responsive</button> <button class="$$btn $$btn-xs sm:$$btn-sm md:$$btn-md lg:$$btn-lg xl:$$btn-xl">Responsive</button> Neutral Primary Secondary Accent Info Success Warning Error ·
🌐
Stack Overflow
stackoverflow.com › questions › 67085990 › make-button-fit-in-responsive-tailwindcss
reactjs - Make button fit in responsive tailwindcss - Stack Overflow
const displayAlphabet = () => { let res = [] for (let i = 65; i < 91; i++) { res.push( <button key={i} className="font-bold text-saf-300 w-6" type="button" onClick={(e) => setSearchItem(e.target.value)} value={String.fromCharCode(i)}>{String.fromCharCode(i)}</button> ) } res.push(<button type='button' onClick={(e) => setSearchItem("") } className="fas fa-undo text-saf-300"></button>) return res } return ( <div className="min-h-screen mt-10"> <div className="flex justify-center mb-10"> <h1 className="uppercase font-bold text-saf-300 text-4xl">découvrez la liste des lots</h1> </div> <div className="flex ml-11 space-x-8"> {displayAlphabet()} </div> </div> )
🌐
CodePen
codepen.io › cvonu › pen › bGpOXjd
Tailwind Responsive Button Visibility
<body class="bg-blue-100 m-4 md:mx-10"> <div class="flex justify-end"> <button class="bg-orange-300 invisible sm:visible rounded shadow hover:shadow-lg py-2 px-4 transition duration-150"> <a href="https://www.perfectingproduct.com"> Hide on small screens </a> </button> </div> <div class="text-6xl font-bold text-blue-500 mt-12 sm:mt-40 leading-none mb-6"> Mobile First Design </div> <button class="bg-orange-300 rounded shadow hover:shadow-lg py-2 px-4 transition duration-150"> <a href="https://www.perfectingproduct.com"> Show on all screen sizes </a> </button> </body>
🌐
TW Elements
tw-elements.com › docs › standard › components › buttons
Tailwind CSS Buttons - Free Examples & Tutorial
Use responsive buttons component with helper examples for links, disabled state, block buttons, sizing, outlines & more. Free download, open-source license.
🌐
Tailwind CSS
v1.tailwindcss.com › components › buttons
Buttons - Tailwind CSS
<button class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center"> <svg class="fill-current w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z"/></svg> <span>Download</span> </button> ... Beautiful UI components by the creators of Tailwind CSS.
🌐
Flowbite
flowbite.com › docs › components › buttons
Tailwind CSS Buttons - Flowbite
Use these button styles when building social media login forms using Facebook, Twitter, GitHub, Google, and Apple. These buttons use the new bg-[#hex] utility classes from Tailwind CSS v3.0.
Find elsewhere
🌐
Tailwind CSS
tailwindcss.com › docs › hover-focus-and-other-states
Hover, focus, and other states - Core concepts - Tailwind CSS
<button class="bg-violet-500 hover:bg-violet-600 focus:outline-2 focus:outline-offset-2 focus:outline-violet-500 active:bg-violet-700 ..."> Save changes</button> Tailwind also includes variants for other interactive states like :visited, :focus-within, :focus-visible, and more.
🌐
Front-end Reference
frontendreference.com › tailwindcss-button-example.html
Designing Buttons with Tailwind CSS: A Comprehensive Guide
July 14, 2023 - Learn how to craft appealing and responsive buttons using Tailwind CSS. This guide includes a detailed example showcasing the power and flexibility of Tailwind.
🌐
FlyonUI
flyonui.com › docs › components › button
Tailwind CSS Button | FlyonUI
<button class="btn btn-primary... btn-primary btn-disabled">Disabled</button> Add responsive class btn-{size} where {size} = xs|sm|md|lg|xl for button of different sizes....
🌐
Material Tailwind
material-tailwind.com › docs › react › button
Tailwind CSS Button for React - Material Tailwind
import type { ButtonProps } from "@material-tailwind/react"; type variant = "filled" | "outlined" | "gradient" | "text"; ... type color = | "white" | "black" | "blue-gray" | "gray" | "brown" | "deep-orange" | "orange" | "amber" | "yellow" | "lime" | "light-green" | "green" | "teal" | "cyan" | "light-blue" | "blue" | "indigo" | "deep-purple" | "purple" | "pink" | "red"; Learn how to customize the theme and styles for button component, the theme object for button component has three main objects:
🌐
TW Elements
tw-elements.com › docs › react › components › buttons
Tailwind CSS React Buttons - Free Examples & Tutorial
Use responsive buttons component with helper examples for links, disabled state, block buttons, sizing, outlines & more.
🌐
FreeFrontend
freefrontend.com › tailwind-buttons
46 Tailwind Buttons
February 4, 2026 - See the Pen Tailwind Icon Buttons. ... A set of responsive social login buttons for Google, GitHub, and Facebook, styled with Tailwind CSS.
🌐
Material Tailwind
material-tailwind.com › docs › v3 › react › button
React and Tailwind CSS Button - Material Tailwind v3
Discover how to create versatile and responsive buttons using React and Tailwind CSS with Material Tailwind v3. Customize styles and interactions easily.
🌐
Material Tailwind
material-tailwind.com › docs › html › button
Tailwind CSS Button - Material Tailwind
Check out more button components examples from Material Tailwind Blocks. • Ensure accessibility: Use ARIA attributes and ensure adequate contrast. • Descriptive labels: Clearly indicate the button's action. • Responsive design: Ensure ease of interaction on all devices.
🌐
End Point Dev
endpointdev.com › blog › 2021 › 12 › responsive-website-with-tailwindcss
Building responsive websites with Tailwind CSS | End Point Dev
<!-- py-2 px-4 font-semibold rounded-lg shadow-md gets applied when using "button" --> <button class="button">I'm a button</button> <!-- py-2 px-4 font-semibold rounded-lg shadow-md text-white bg-green-400 gets applied --> <button class="button success">I'm a green button</button> Now let’s look at responsive design.
🌐
Tailkits
tailkits.com › blog
Using w-fit for Content-Responsive Widths in Tailwind CSS | Tailkits
December 12, 2024 - A big draw of Tailwind is its ability to handle responsive design with minimal hassle. With w-fit, you can do something like: <button class="px-4 py-2 bg-indigo-500 text-white rounded w-full sm:w-fit"> Learn More </button>
🌐
daily.dev
daily.dev › home › blog › tailwind css › tailwind css from zero to hero - responsiveness and custom utilities
Tailwind CSS from Zero to Hero - Responsiveness and Custom Utilities
June 14, 2021 - Tailwind allows the following five prefixes for common breakpoints by default: ... And of course, you can easily change the default breakpoint values according to the need and add more. Okay, so how to use these new responsive utilities? Let’s say if you want to change an <input /> element’s width from w-20 (5rem) to w-10 (2.5rem) on small and maybe w-40 on the large breakpoint.
🌐
Windframe
windframe.dev › home › blog › tailwind form-how to create and style a responsive form using tailwind css
Tailwind CSS Forms - Build Responsive Styled Forms
August 14, 2025 - The classes we added to the button will have rounded borders with a purple background color, full width, and outline focus with padding and margins. Our Tailwind form should look like the image below.