astro-buttons
v0.0.1A collection of beautifully designed, standalone UI kit button components for Astro
xnex install astro-buttons GitHub repo β‘ Astro Buttons UI Kit Recipe
Premium, standalone, zero-dependency button components designed specifically for Astro projects. Copy directly into your codebase, customize visually via props, and keep your global CSS completely clean.
π Why Use This Recipe?
Building buttons sounds simple until your design demands Glassmorphism, Cyberpunk Neon Glows, Interactive Ripples, or 3D Neo-Brutalist shadowsβand suddenly you spend hours writing custom CSS or wrestling with heavy UI framework dependencies.
This recipe eliminates that friction for Astro developers:
- π§© Zero Node Modules Bloat: Components live directly inside your project under
src/components/buttons/. You own the code. - π¨ Zero-CSS Customization: Want custom colors or rounded corners? Don't open CSS files! Pass
bg="#8b5cf6"orradius="full"as props and let the component bind variables under the hood. - π‘οΈ Zero Global CSS Side-Effects: Every button uses Astro-scoped styles (
<style>). Pick 1 variant or all 8βthey will never clash with each other or your global stylesheets. - β‘ Smart Polymorphism: Pass an
hrefprop and the component seamlessly morphs from a<button>into a fully accessible<a>tag. - β³ Built-In Micro-Interactions: Hover light reflections, click ripples, loading spinners, and pulse effects work out of the box with zero runtime libraries.
π¦ What's Inside?
Choose any combination of variants depending on your project's aesthetic:
| Variant | Component File | Visual Vibe |
|---|---|---|
| Basic | basic.button.astro | Clean, versatile UI baseline with Primary, Secondary, Ghost, Outline, Danger, and Success presets. |
| Glass | glass.button.astro | Modern glassmorphism with backdrop blur and dynamic light-sheen reflection on hover. |
| Neon | neon.button.astro | Cyberpunk sci-fi glowing borders with optional pulsing energy animations. |
| Gradient | gradient.button.astro | Vibrant animated mesh gradients with smooth shimmer wave overlays. |
| Retro | retro.button.astro | Neo-Brutalist 3D tactile button with bold offset hard box-shadows. |
| Ripple | ripple.button.astro | Material-style expanding wave effect triggered on click coordinates. |
| Glow | glow.button.astro | SaaS-inspired rotating border-beam aura glow for high-converting CTA sections. |
| Minimal | minimal.button.astro | Ultra-sleek soft pills, bordered lines, and subtle underline hover highlights. |
π Quick Start
1. Basic Usage
Import the button variant you selected in your recipe:
---
import GlassButton from '../components/buttons/glass.button.astro';
import NeonButton from '../components/buttons/neon.button.astro';
---
<GlassButton variant="frosted" size="lg">
Explore Features
</GlassButton>
<NeonButton variant="cyan" pulsing={true}>
Launch System
</NeonButton>
2. Customizing Without Writing CSS
Change background colors, text tones, or border radius straight from Astro props:
---
import GradientButton from '../components/buttons/gradient.button.astro';
import RetroButton from '../components/buttons/retro.button.astro';
---
<!-- Custom purple gradient with full pill radius -->
<GradientButton bg="linear-gradient(135deg, #a855f7, #ec4899)" radius="full">
Custom Purple
</GradientButton>
<!-- Custom emerald retro button with dark green 3D shadow -->
<RetroButton bg="#10b981" textColor="#000000" shadowColor="#064e3b" radius="md">
Custom Retro
</RetroButton>
3. Loading States & Icon Slots
All variants support built-in loading spinners and icon slots:
---
import BasicButton from '../components/buttons/basic.button.astro';
---
<!-- Loading Spinner State -->
<BasicButton variant="primary" isLoading={true} loadingText="Saving changes..." />
<!-- Icon Slot Integration -->
<BasicButton variant="primary">
<svg slot="icon-left" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M5 12h14M12 5l7 7-7 7"/>
</svg>
Continue
</BasicButton>
π οΈ Common Props API
All 8 button variants implement the same predictable API:
| Prop | Type | Default | Description |
|---|---|---|---|
variant | string | Variant-specific | Preset visual style variant. |
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Button padding and typography scale. |
radius | 'none' | 'sm' | 'md' | 'lg' | 'full' | 'md' | Corner border radius. |
bg | string | undefined | Custom background color or CSS gradient (Zero-CSS override). |
textColor | string | undefined | Custom text color. |
borderColor | string | undefined | Custom border color. |
isFullWidth | boolean | false | Stretches button width to 100% of container. |
isLoading | boolean | false | Displays animated spinner and disables interaction. |
loadingText | string | undefined | Optional text shown next to the spinner. |
disabled | boolean | false | Disables clicks and applies muted styles. |
href | string | undefined | Automatically renders an <a> anchor element if set. |
target | string | undefined | Anchor target attribute (e.g. _blank). |
type | 'button' | 'submit' | 'reset' | 'button' | Button type attribute. |
π‘ Developer Experience
When you download this recipe, your chosen variants land straight inside src/components/buttons/. There are no black-box abstractions, no complex configuration files, and no unexpected global CSS overrides.
It's your code, clean, fast, and ready for production. Happy building! π
Versions
Release links are tracked by Nex; source code lives in the developer's GitHub repo.
setup.files
Files that will be integrated into your project
- recipes
- astro-buttons
- README.md β recipes/astro-buttons
-
-
- src
- pages
- astro-button-test.astro β src/pages
-
-
nexconfig
Full recipe configuration
{
"name": "astro-buttons",
"version": "0.0.1",
"description": "A collection of beautifully designed, standalone UI kit button components for Astro",
"keywords": [
"astro",
"buttons",
"ui-kit",
"components",
"recipe"
],
"files": [
"src/components",
"src/pages/astro-button-test.astro",
"recipes/astro-buttons/README.md"
],
"setup": {
"files": {
"src/pages/astro-button-test.astro": "src/pages",
"recipes/astro-buttons/README.md": "recipes/astro-buttons"
},
"variants": [
{
"name": "basic button",
"description": "Versatile modern basic button with variants, sizes, states, and slots",
"setup": {
"files": {
"src/components/buttons/basic.button.astro": "src/components/buttons"
}
}
},
{
"name": "glass button",
"description": "Glassmorphic frosted glass button with light reflection sheen effect",
"setup": {
"files": {
"src/components/buttons/glass.button.astro": "src/components/buttons"
}
}
},
{
"name": "neon button",
"description": "Cyberpunk high-tech glowing button with pulsing energy animations",
"setup": {
"files": {
"src/components/buttons/neon.button.astro": "src/components/buttons"
}
}
},
{
"name": "gradient button",
"description": "Vibrant multi-color mesh gradient button with shimmer wave animation",
"setup": {
"files": {
"src/components/buttons/gradient.button.astro": "src/components/buttons"
}
}
},
{
"name": "retro button",
"description": "Neo-Brutalist 3D tactile button with hard offset box shadow",
"setup": {
"files": {
"src/components/buttons/retro.button.astro": "src/components/buttons"
}
}
},
{
"name": "ripple button",
"description": "Interactive Material-inspired ripple expanding wave button",
"setup": {
"files": {
"src/components/buttons/ripple.button.astro": "src/components/buttons"
}
}
},
{
"name": "glow button",
"description": "SaaS style border-beam rotating ambient aura glow button",
"setup": {
"files": {
"src/components/buttons/glow.button.astro": "src/components/buttons"
}
}
},
{
"name": "minimal button",
"description": "Ultra-sleek minimalist soft pill and subtle line button",
"setup": {
"files": {
"src/components/buttons/minimal.button.astro": "src/components/buttons"
}
}
}
]
}
}
basic button
Versatile modern basic button with variants, sizes, states, and slots
Files
- src
- components
- buttons
- basic.button.astro β src/components/buttons
-
-
-
`basic button` raw config
Full `basic button` variant configuration
{
"name": "basic button",
"description": "Versatile modern basic button with variants, sizes, states, and slots",
"setup": {
"files": {
"src/components/buttons/basic.button.astro": "src/components/buttons"
}
}
}
glass button
Glassmorphic frosted glass button with light reflection sheen effect
Files
- src
- components
- buttons
- glass.button.astro β src/components/buttons
-
-
-
`glass button` raw config
Full `glass button` variant configuration
{
"name": "glass button",
"description": "Glassmorphic frosted glass button with light reflection sheen effect",
"setup": {
"files": {
"src/components/buttons/glass.button.astro": "src/components/buttons"
}
}
}
neon button
Cyberpunk high-tech glowing button with pulsing energy animations
Files
- src
- components
- buttons
- neon.button.astro β src/components/buttons
-
-
-
`neon button` raw config
Full `neon button` variant configuration
{
"name": "neon button",
"description": "Cyberpunk high-tech glowing button with pulsing energy animations",
"setup": {
"files": {
"src/components/buttons/neon.button.astro": "src/components/buttons"
}
}
}
gradient button
Vibrant multi-color mesh gradient button with shimmer wave animation
Files
- src
- components
- buttons
- gradient.button.astro β src/components/buttons
-
-
-
`gradient button` raw config
Full `gradient button` variant configuration
{
"name": "gradient button",
"description": "Vibrant multi-color mesh gradient button with shimmer wave animation",
"setup": {
"files": {
"src/components/buttons/gradient.button.astro": "src/components/buttons"
}
}
}
retro button
Neo-Brutalist 3D tactile button with hard offset box shadow
Files
- src
- components
- buttons
- retro.button.astro β src/components/buttons
-
-
-
`retro button` raw config
Full `retro button` variant configuration
{
"name": "retro button",
"description": "Neo-Brutalist 3D tactile button with hard offset box shadow",
"setup": {
"files": {
"src/components/buttons/retro.button.astro": "src/components/buttons"
}
}
}
ripple button
Interactive Material-inspired ripple expanding wave button
Files
- src
- components
- buttons
- ripple.button.astro β src/components/buttons
-
-
-
`ripple button` raw config
Full `ripple button` variant configuration
{
"name": "ripple button",
"description": "Interactive Material-inspired ripple expanding wave button",
"setup": {
"files": {
"src/components/buttons/ripple.button.astro": "src/components/buttons"
}
}
}
glow button
SaaS style border-beam rotating ambient aura glow button
Files
- src
- components
- buttons
- glow.button.astro β src/components/buttons
-
-
-
`glow button` raw config
Full `glow button` variant configuration
{
"name": "glow button",
"description": "SaaS style border-beam rotating ambient aura glow button",
"setup": {
"files": {
"src/components/buttons/glow.button.astro": "src/components/buttons"
}
}
}
minimal button
Ultra-sleek minimalist soft pill and subtle line button
Files
- src
- components
- buttons
- minimal.button.astro β src/components/buttons
-
-
-
`minimal button` raw config
Full `minimal button` variant configuration
{
"name": "minimal button",
"description": "Ultra-sleek minimalist soft pill and subtle line button",
"setup": {
"files": {
"src/components/buttons/minimal.button.astro": "src/components/buttons"
}
}
}
You might also be interested in these
astro-cards
A collection of beautifully designed, standalone UI kit card components for Astro
nestjs-basic-auth
NESTJS BASIC AUTH RECIPE
nestjs
NESTJS EMPTY TEMPLATE
nestjs-logging
NESTJS REQUEST LOGGING MIDDLEWARE RECIPE
fastapi-exceptions
Global exception handling module and demo error endpoints for FastAPI recipes.