Component

Gradient Button

Gradient buttons with linear, multi-stop, directional, pill, shadow, and dark background variants

  • Component
  • Tailwind
  • MIT

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/components/buttons/gradient-button/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Buttons/gradient-button
registry path: Tailwind/Components/Buttons/gradient-button

Source

Implementation

code.html
<!-- Linear Gradient Button -->
<button class="px-6 py-2.5 bg-gradient-to-r from-blue-500 to-blue-600 text-white font-medium rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-opacity">
  Blue Gradient
</button>

<!-- Purple Pink -->
<button class="px-6 py-2.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white font-medium rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 transition-opacity">
  Purple Pink
</button>

<!-- Sizes -->
<button class="px-3 py-1.5 bg-gradient-to-r from-blue-500 to-purple-500 text-white text-xs font-medium rounded-md hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-opacity">
  Small
</button>

<button class="px-4 py-2 bg-gradient-to-r from-blue-500 to-purple-500 text-white text-sm font-medium rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-opacity">
  Default
</button>

<button class="px-6 py-3 bg-gradient-to-r from-blue-500 to-purple-500 text-white text-base font-medium rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-opacity">
  Large
</button>
22 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/buttons/gradient-button
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/buttons/gradient-button/

Install: npx devsnips add
Tailwind/Components/Buttons/gradient-button

This is the Gradient Button — Gradient buttons with linear, multi-stop, directional, pill, shadow, and dark background variants

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/buttons/gradient-button