Ibikubiye k'urubuga
HTML Form Ifite Animated Border
HTML Form Ifite Animated Border
⭐ Exclusive Frontend Technology

HTML Form Ifite Animated Border

HTML Form Ifite Animated Border

Software · · Feb 21, 2026
📁
Frontend Technology
Category
📚
Software
Subject
🕒
Feb 2026
Updated

Source Code Examples

HTML
HTML Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auth — Luminary</title>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
</head>
<body>
<!-- Floating particles -->
<div class="particles" id="particles"></div>
<!-- ── NAVBAR ── -->
<nav>
<div class="nav-logo">Luminary</div>
<ul class="nav-links">
<li><a href="#">About</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">Blog</a></li>
</ul>
<a href="#" class="nav-cta">Get Access</a>
</nav>
<!-- ── MAIN CARD ── -->
<main>
<div class="card-wrapper">
<div class="card-glow"></div>
<div class="card-border"></div>
<div class="card">
<div class="tabs">
<button class="tab-btn active" onclick="switchTab('login', this)">Sign In</button>
<button class="tab-btn" onclick="switchTab('signup', this)">Create Account</button>
</div>
<!-- LOGIN -->
<div class="form-panel active" id="login">
<h2 class="form-title">Welcome back</h2>
<p class="form-subtitle">Sign in to continue your journey.</p>
<div class="field">
<label for="login-email">Email address</label>
<input type="email" id="login-email" placeholder="you@example.com" autocomplete="email">
</div>
<div class="field">
<label for="login-pass">Password</label>
<input type="password" id="login-pass" placeholder="••••••••" autocomplete="current-password">
</div>
<a href="#" class="forgot">Forgot password?</a>
<button class="btn-submit">Sign In</button>
<div class="divider">or continue with</div>
<div class="social-row">
<a href="#" class="social-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
Google
</a>
<a href="#" class="social-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.342-3.369-1.342-.454-1.155-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.202 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.416 22 12c0-5.523-4.477-10-10-10z"/></svg>
GitHub
</a>
</div>
</div>
<!-- SIGNUP -->
<div class="form-panel" id="signup">
<h2 class="form-title">Join us today</h2>
<p class="form-subtitle">Create an account to get started.</p>
<div class="row-2">
<div class="field">
<label>First Name</label>
<input type="text" placeholder="Jane" autocomplete="given-name">
</div>
<div class="field">
<label>Last Name</label>
<input type="text" placeholder="Doe" autocomplete="family-name">
</div>
</div>
<div class="field">
<label>Email address</label>
<input type="email" placeholder="you@example.com" autocomplete="email">
</div>
<div class="field">
<label>Password</label>
<input type="password" placeholder="Min. 8 characters" autocomplete="new-password">
</div>
<div class="field">
<label>Confirm Password</label>
<input type="password" placeholder="Repeat password" autocomplete="new-password">
</div>
<button class="btn-submit">Create Account</button>
<div class="divider">or continue with</div>
<div class="social-row">
<a href="#" class="social-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
Google
</a>
<a href="#" class="social-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.342-3.369-1.342-.454-1.155-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.202 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.416 22 12c0-5.523-4.477-10-10-10z"/></svg>
GitHub
</a>
</div>
<p class="terms">By creating an account you agree to our <a href="#">Terms of Service</a> and <a href="#">Privacy Policy</a>.</p>
</div>
</div>
</div>
</main>
</body>
</html>
CSS
CSS Styles
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #050508;
    --surface: #0d0d14;
    --gold: #c8a96e;
    --gold-light: #e8c98e;
    --gold-dim: #7a6040;
    --text: #f0ead8;
    --muted: #8a8070;
    --border: rgba(200,169,110,0.2);
}
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}
/* Background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(200,169,110,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(100,80,160,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
/* ── NAVBAR ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 64px;
    background: rgba(5,5,8,0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    animation: navSlide 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes navSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}
.nav-links a {
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--gold);
    padding: 8px 20px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}
.nav-cta:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}
/* ── MAIN ── */
main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}
/* ── CARD ── */
.card-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    animation: cardRise 1s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}
@keyframes cardRise {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
/* Animated border using conic gradient */
.card-border {
    position: absolute;
    inset: -2px;
    border-radius: 6px;
    background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    var(--gold) 60deg,
    var(--gold-light) 120deg,
    transparent 180deg,
    transparent 360deg
    );
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes rotateBorder {
    to { --angle: 360deg; }
}
/* Glow behind card */
.card-glow {
    position: absolute;
    inset: -20px;
    border-radius: 20px;
    background: radial-gradient(ellipse at 50% 50%, rgba(200,169,110,0.15), transparent 70%);
    animation: glowPulse 3s ease-in-out infinite alternate;
    z-index: -2;
}
@keyframes glowPulse {
    from { opacity: 0.5; transform: scale(0.95); }
    to   { opacity: 1;   transform: scale(1.05); }
}
.card {
    background: var(--surface);
    border-radius: 5px;
    padding: 48px 44px;
    position: relative;
}
/* ── TABS ── */
.tabs {
    display: flex;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
}
.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    transition: color 0.3s;
    outline: none;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.tab-btn.active {
    color: var(--gold);
}
.tab-btn.active::after {
    transform: scaleX(1);
}
/* ── FORMS ── */
.form-panel {
    display: none;
    animation: fadeUp 0.4s ease both;
}
.form-panel.active { display: block; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.form-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 6px;
}
.form-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 32px;
    font-weight: 300;
}
.field {
    margin-bottom: 20px;
    position: relative;
}
label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
}
input {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(200,169,110,0.15);
    border-radius: 3px;
    padding: 13px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--text);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    outline: none;
}
input::placeholder { color: #3a3530; }
input:focus {
    border-color: var(--gold);
    background: rgba(200,169,110,0.04);
    box-shadow: 0 0 0 3px rgba(200,169,110,0.08);
}
/* Floating label line effect */
.field::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s ease;
}
.field:focus-within::after { width: calc(100% - 2px); }
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.forgot {
    display: block;
    text-align: right;
    font-size: 0.74rem;
    color: var(--gold-dim);
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 24px;
    transition: color 0.3s;
}
.forgot:hover { color: var(--gold); }
.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 3px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    margin-top: 8px;
}
.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}
.btn-submit:active::before {
    width: 300px;
    height: 300px;
}
.btn-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200,169,110,0.25);
}
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.social-row {
    display: flex;
    gap: 10px;
}
.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.social-btn:hover {
    border-color: var(--gold-dim);
    color: var(--text);
    background: rgba(200,169,110,0.05);
}
/* Corner accents on card */
.card::before, .card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--gold);
    border-style: solid;
    opacity: 0.4;
}
.card::before {
    top: 12px; left: 12px;
    border-width: 1px 0 0 1px;
}
.card::after {
    bottom: 12px; right: 12px;
    border-width: 0 1px 1px 0;
}
/* ── PARTICLES ── */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: float var(--dur) var(--delay) ease-in-out infinite;
}
@keyframes float {
    0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
    10%  { opacity: 0.4; }
    90%  { opacity: 0.1; }
    100% { transform: translateY(-10vh) translateX(var(--drift)); opacity: 0; }
}
.terms {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
    margin-top: 18px;
    line-height: 1.6;
}
.terms a {
    color: var(--gold-dim);
    text-decoration: none;
    transition: color 0.3s;
}
.terms a:hover { color: var(--gold); }
JavaScript
JavaScript Code
// Tab switch
function switchTab(panel, btn) {
    document.querySelectorAll('.form-panel').forEach(p => p.classList.remove('active'));
    document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
    document.getElementById(panel).classList.add('active');
    btn.classList.add('active');
}
// Particles
const container = document.getElementById('particles');
for (let i = 0; i < 28; i++) {
    const p = document.createElement('div');
    p.className = 'particle';
    const x = Math.random() * 100;
    const drift = (Math.random() - 0.5) * 120;
    const dur = 8 + Math.random() * 12;
    const delay = Math.random() * 14;
    p.style.cssText = `
    left: ${x}%;
    --dur: ${dur}s;
    --delay: -${delay}s;
    --drift: ${drift}px;
    width: ${1 + Math.random() * 2}px;
    height: ${1 + Math.random() * 2}px;
    opacity: ${0.2 + Math.random() * 0.5};
    `;
    container.appendChild(p);
}

Project Description

Iya ni amakode akoze HTML Form nziza cyane, ifite borders ziri animated. Kandi ikaba iri mumabara meza cyane.

Ikozwe muri:

  • HTML
  • CSS
  • JavaScript

Dore impamvu kuyikoresha muri website yawe, bikungura.

  • Ninziza cyane, isa neza.
  • Ubwayo yakurura abakiriya bitewe nuko ifite UX nziza.
  • Ifite agashya kuko border zayo ziri animated, bituma ikurura abakiriya.
  • Kuyikoresha muri website iyo ari yose biroroshye, kandi ntakiguzi.

Project Resources

Download source code, images, and documentation

📦 4.71 KB 🗜 ZIP Format

Project Information

Feb 21, 2026 Created
Feb 22, 2026 Updated

Share This Project

If you found this helpful, share it with others who might benefit.

Link yakopiwe!

Cookie Settings

Theme Customization