Gradient Button
Style a button with a smooth gradient, focus state, and hover effect.
<button class="gradient-button">Get started</button>
How it works
Style a button with a smooth gradient, focus state, and hover effect. Start by changing the sample content to fit your project, then test the result at a narrow screen width and with keyboard navigation. Keep the markup, styling, and behavior easy to identify, and remove any sample values you do not need.
Related styling example
.gradient-button{border:0;border-radius:999px;padding:.8rem 1.25rem;color:white;font-weight:700;background:linear-gradient(120deg,#2563eb,#7c3aed);cursor:pointer;transition:transform .2s}.gradient-button:hover{transform:translateY(-2px)}.gradient-button:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}