Gaming RPG Button
Fantasy game interface with decorative borders, gold trim, stone textures, and magical glow
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/gaming-rpg-button.
<iframe src="/embed/gaming-rpg-button" sandbox="allow-scripts" loading="lazy" title="Gaming RPG Button" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Gaming RPG Button, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<button class="rpg-button"><span>⚔️ Quest</span></button>CSS
.rpg-button {
position: relative;
padding: 1rem 2rem;
border-radius: 0.5rem;
background: linear-gradient(180deg, #2d1b0e, #4a2c11, #2d1b0e);
color: #ffd700;
font-weight: 700;
letter-spacing: 0.05em;
border: 2px solid #8b6914;
cursor: pointer;
box-shadow: 0 0 15px rgba(255,215,0,0.15), inset 0 1px 0 rgba(255,215,0,0.1);
transition: all 0.3s ease;
overflow: hidden;
}
.rpg-button::before {
content: '';
position: absolute;
inset: 0;
background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,215,0,0.05) 2px, rgba(255,215,0,0.05) 4px);
pointer-events: none;
}
.rpg-button:hover {
color: #ffed4a;
border-color: #ffd700;
background: linear-gradient(180deg, #3d2b1e, #5a3c21, #3d2b1e);
box-shadow: 0 0 30px rgba(255,215,0,0.3), inset 0 1px 0 rgba(255,215,0,0.2);
}
.rpg-button:active {
color: #daa520;
box-shadow: 0 0 10px rgba(255,215,0,0.2), inset 0 2px 4px rgba(0,0,0,0.3);
}Tailwind CSS
<button class="px-8 py-4 rounded-lg font-bold tracking-wider border-2 bg-gradient-to-b from-[#2d1b0e] via-[#4a2c11] to-[#2d1b0e] text-[#ffd700] border-[#8b6914] shadow-[0_0_15px_rgba(255,215,0,0.15),inset_0_1px_0_rgba(255,215,0,0.1)] hover:text-[#ffed4a] hover:border-[#ffd700] hover:shadow-[0_0_30px_rgba(255,215,0,0.3),inset_0_1px_0_rgba(255,215,0,0.2)] active:text-[#daa520] active:shadow-[0_0_10px_rgba(255,215,0,0.2),inset_0_2px_4px_rgba(0,0,0,0.3)] transition-all overflow-hidden relative before:absolute before:inset-0 before:bg-[repeating-linear-gradient(45deg,transparent,transparent_2px,rgba(255,215,0,0.05)_2px,rgba(255,215,0,0.05)_4px)] before:pointer-events-none">
<span class="relative z-10">⚔️ Quest</span>
</button>React
function RpgButton() {
return (
<motion.button
className="px-8 py-4 rounded-lg font-bold tracking-wider border-2 relative overflow-hidden"
style={{ background: 'linear-gradient(180deg, #2d1b0e, #4a2c11, #2d1b0e)', color: '#ffd700', borderColor: '#8b6914', boxShadow: '0 0 15px rgba(255,215,0,0.15), inset 0 1px 0 rgba(255,215,0,0.1)' }}
whileHover={{ color: '#ffed4a', borderColor: '#ffd700', boxShadow: '0 0 30px rgba(255,215,0,0.3), inset 0 1px 0 rgba(255,215,0,0.2)' }}
whileTap={{ color: '#daa520', scale: 0.98 }}
transition={{ duration: 0.3 }}
>
<div style={{ position: 'absolute', inset: 0, backgroundImage: 'repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,215,0,0.05) 2px, rgba(255,215,0,0.05) 4px)', pointerEvents: 'none' }} />
<span style={{ position: 'relative', zIndex: 10 }}>⚔️ Quest</span>
</motion.button>
);
}LWC — HTML template
<template><button class="rpg-button" onclick={handleClick}><span style="position:relative;z-index:10"><slot>⚔️ Quest</slot></span></button></template>LWC — JavaScript
import { LightningElement, api } from 'lwc';
export default class RpgButton extends LightningElement {
@api label = '⚔️ Quest';
handleClick() { this.dispatchEvent(new CustomEvent('buttonclick', { bubbles: true, composed: true })); }
}LWC — CSS
.rpg-button { position: relative; padding: 1rem 2rem; border-radius: 0.5rem; background: linear-gradient(180deg, #2d1b0e, #4a2c11, #2d1b0e); color: #ffd700; font-weight: 700; letter-spacing: 0.05em; border: 2px solid #8b6914; cursor: pointer; box-shadow: 0 0 15px rgba(255,215,0,0.15), inset 0 1px 0 rgba(255,215,0,0.1); transition: all 0.3s ease; overflow: hidden; }
.rpg-button::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,215,0,0.05) 2px, rgba(255,215,0,0.05) 4px); pointer-events: none; }
.rpg-button:hover { color: #ffed4a; border-color: #ffd700; background: linear-gradient(180deg, #3d2b1e, #5a3c21, #3d2b1e); box-shadow: 0 0 30px rgba(255,215,0,0.3), inset 0 1px 0 rgba(255,215,0,0.2); }
.rpg-button:active { color: #daa520; box-shadow: 0 0 10px rgba(255,215,0,0.2), inset 0 2px 4px rgba(0,0,0,0.3); }LWC — Configuration
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<targets><target>lightning__AppPage</target><target>lightning__RecordPage</target><target>lightning__HomePage</target></targets>
</LightningComponentBundle>Where Gaming RPG Button fits
- Games
- Interactive Stories
- Entertainment
- Fantasy Apps
Interaction states & animations
- Hover
- Magic Pulse
- Sparkles
- Glow
Topics
- #gaming
- #rpg
- #fantasy
- #gold
- #magical
- #medieval
Accessibility notes
Gold-on-dark needs careful contrast. Provide visible focus ring. Avoid relying solely on color for state changes.
Browser support
- All modern browsers