Button
The Button component enables users to initiate an action with a single tap
Basic
Code
<Button onClick={()=>{
window.alert("You've just clicked me!")
}}>
Click Me
</Button>
Customization
You can use CSS class to customize its style
such as using Tailwind CSS classes or your own classes
Code
<Button
id="MyCustomButton"
className="w-48 border border-gray-300 rounded dark:bg-gray-800 bg-gray-100 px-2 py-1 dark:hover:bg-gray-700 hover:bg-gray-300"
onClick={() => {
window.alert("You've just clicked me!");
}}
>
Click Me
</Button>