Component
Linear Gradient Button
Two-color horizontal gradient buttons with multiple color combinations
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.site/library/tailwind/components/buttons/gradient-button/linear/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/gradient-button/linear Tailwind/Components/Buttons/gradient-button/linear <!-- 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> # Gradient Button Linear
Linear gradient filled button.
## Preview
Open `preview.html` for a standalone demonstration.
## Features
- Linear gradient background
- Focus-visible states
- Native button
## Usage
```bash
npx devsnips add Tailwind/Components/Buttons/gradient-button/linear
```
Copy from `code.html`.
## Customization
- Gradient stops (`from-*` / `via-*` / `to-*`)
- Hover brightness / opacity
## Accessibility
- Native `<button>`
- Ensure text contrast against the gradient
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` · `preview.html` · `metadata.json` · `README.md` 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/linear I want to use this DevSnips resource in production: Page: https://devsnips.site/library/tailwind/components/buttons/gradient-button/linear/ Install: npx devsnips add Tailwind/Components/Buttons/gradient-button/linear This is the Linear Gradient Button — Two-color horizontal gradient buttons with multiple color combinations 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/linear