Gradient Button Template

Add a vibrant and modern touch to your calls-to-action with this beautiful gradient button.

This button uses a CSS gradient to create a dynamic look that stands out, making it an excellent choice for sign-ups, promotions, or other key user actions.

Screenshot of a button with a colorful, modern gradient background.

Get Source Code Preview

About the Gradient Button

A gradient button is a stylish alternative to a solid-color button. By blending two or more colors, it can add depth and a sense of energy to your design. This template is designed not just to look good, but to feel responsive. A subtle hover animation lifts the button and makes the gradient more intense, inviting the user to click.

Features

Code Breakdown

The core of this button's style comes from the background-image property, which is set to a linear-gradient(). For the hover effect, the gradient's background size is set to be larger than the button itself. On hover, the background-position is changed, which causes the visible part of the gradient to shift. This is all animated smoothly via the transition property for a seamless user experience.

Code

Here is the complete code for the animated gradient button.

View Output