Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/docs/src/routes/(routes)/components/button/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,3 +495,33 @@ classnames:
</button>

```

### ~Button with gradient background
<button class="btn bg-linear-to-r from-primary to-secondary">Static Gradient</button>

<button class="btn bg-gradient-to-r from-primary via-secondary to-accent bg-[length:300%_300%]
animate-[gradient-animation_5s_ease_infinite]">
Animated Gradient
</button>
<style>
@keyframes gradient-animation {
0% { background-position: 0% 50% }
50% { background-position: 100% 50% }
100% { background-position: 0% 50% }
}
</style>

```html
<button class="$$btn bg-linear-to-r from-primary to-secondary">Static Gradient</button>
<button class="$$btn bg-gradient-to-r from-primary via-secondary to-accent bg-[length:300%_300%]
animate-[gradient-animation_5s_ease_infinite]">
Animated Gradient
</button>
<style>
@keyframes gradient-animation {
0% { background-position: 0% 50% }
50% { background-position: 100% 50% }
100% { background-position: 0% 50% }
}
</style>
```