Component
Ghost Button
Transparent buttons that reveal background color on hover
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.site/library/tailwind/components/buttons/ghost-button/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/ghost-button Tailwind/Components/Buttons/ghost-button <!-- Ghost Button - Default -->
<button class="px-6 py-2.5 text-blue-600 font-medium rounded-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors">
Default
</button>
<!-- Ghost Button - Disabled -->
<button class="px-6 py-2.5 text-blue-600 font-medium rounded-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors" disabled>
Disabled
</button>
<!-- Ghost Button - With Icon -->
<button class="inline-flex items-center gap-2 px-6 py-2.5 text-blue-600 font-medium rounded-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
New Item
</button> # Ghost Button
Transparent buttons that reveal background color on hover.
## Variants
| Variant | Description |
|---------|-------------|
| [Primary](./primary/) | Transparent buttons with blue hover effect |
| Sizes | All button sizes |
## Quick Start
```html
<button class="px-6 py-2.5 text-blue-600 font-medium rounded-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors">
Ghost Button
</button>
```
## Accessibility
- All buttons include visible focus rings
- Use `disabled` attribute for disabled state
- Minimum touch target: 44×44px
## Related
- [Basic Button](../basic-button/) - Solid background buttons
- [Outline Button](../outline-button/) - Bordered buttons
- [Filled Button](../filled-button/) - Soft background variants 15 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/ghost-button I want to use this DevSnips resource in production: Page: https://devsnips.site/library/tailwind/components/buttons/ghost-button/ Install: npx devsnips add Tailwind/Components/Buttons/ghost-button This is the Ghost Button — Transparent buttons that reveal background color on hover 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/ghost-button