Use our buttons based on Tailwind CSS for actions in forms, dialogues, and more with support for multiple sizes, states, and more.
Buttons are an essential element of web design. Basically, buttons are styled links that grab the user's attention. They help users navigate our websites or apps and drive them to a particular action like submitting a contact form, or placing an order as easily as possible.
See below our button components examples.
Use this versatile button that comes with a dark theme with gray background and white text, rounded corners, and a shadow effect on hover, showing interactivity.
See our button examples below. They come in different styles and colors.
Use this example to create buttons in different sizes.
Use this example to create a simple button element for your Tailwind CSS project.
You can use any type of icons inside the button, in the below example we've used the @heroicons.
A button could be a block-level component as well that gets all the available space in a row. You can render a button as a block-level element using the w-full
class.
You can use tailwind css rounded-full
class with Button to create rounded buttons.
You can wrap Button
component with <a>
tag to make it a link.
You can turn on/off the ripple effect for the button component by changing data-ripple-light
or data-ripple-dark
data attributes to true/false
.
You can use tailwind css classes with Button
to create beautiful buttons for different purposes, below you can use some button examples used for authentication with social media and web 3.0.
The button component needs a required script file for ripple effect to work, you just need to add the below script file to the bottom of your html file.
<!-- from node_modules -->
<script src="node_modules/@material-tailwind/html@latest/scripts/ripple.js"></script>
<!-- from cdn -->
<script src="https://unpkg.com/@material-tailwind/html@latest/scripts/ripple.js"></script>
• 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.
• Visual distinctiveness: Make buttons stand out as clickable elements.
• Implement feedback states: Use hover, active, and disabled states for better interactivity.
• Maintain consistency: Keep button styles consistent across the application for intuitive navigation.