Секции страниц contactformsupportchannelsinquiry
Contact Glass Form
Секция контактов с формой на стеклянной панели, интерактивными полями и каналами связи.
Живое превью
Get In Touch
Let's Build Something Exceptional Together
Have a question, custom component inquiry, or need enterprise support? Our team is here to assist.
Average response time: under 2 hours
Direct Email support@astrocomponents.dev
Open Source GitHub github.com/astro-components
Community Discord discord.gg/astro-components
Использование
Скопируйте и вставьте этот код на вашу страницу Astro:
astro
---
import { ContactGlassForm } from 'astro-component-kit';
---
<ContactGlassForm /> ---
import { ContactGlassForm } from 'astro-component-kit';
---
<ContactGlassForm /> Ручная установка
Если вы не используете пакет npm, создайте файл и вставьте следующий код: src/components/lib/ContactGlassForm.astro:
astro
---
/**
* ContactGlassForm — Full-page interactive contact and support section with glassmorphism form and live channel indicators.
*
* @param {string} badge - Eyebrow badge text.
* @param {string} title - Section main heading.
* @param {string} subtitle - Description text.
*/
interface Props {
badge?: string;
title?: string;
subtitle?: string;
className?: string;
}
const {
badge = "Get In Touch",
title = "Let's Build Something Exceptional Together",
subtitle = "Have a question, custom component inquiry, or need enterprise support? Our team is here to assist.",
className = ""
} = Astro.props;
---
<div class="cq-contact-glass-form-cq">
<section class={`contact-section ${className}`} aria-labelledby="contact-title">
<div class="contact-bg" aria-hidden="true">
<div class="contact-glow"></div>
</div>
<div class="container">
<div class="contact-grid">
<!-- Left Column: Info & Channels -->
<div class="contact-info">
{badge && <span class="contact-badge">{badge}</span>}
<h2 id="contact-title" class="contact-title">{title}</h2>
<p class="contact-subtitle">{subtitle}</p>
<!-- Response SLA Badge -->
<div class="sla-badge">
<span class="sla-dot"></span>
<span>Average response time: <strong>under 2 hours</strong></span>
</div>
<!-- Channels List -->
<div class="channels-list">
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Direct Email</span>
<a href="mailto:support@astrocomponents.dev" class="channel-link">support@astrocomponents.dev</a>
</div>
</div>
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Open Source GitHub</span>
<a href="https://github.com" target="_blank" rel="noopener" class="channel-link">github.com/astro-components</a>
</div>
</div>
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Community Discord</span>
<a href="https://discord.com" target="_blank" rel="noopener" class="channel-link">discord.gg/astro-components</a>
</div>
</div>
</div>
</div>
<!-- Right Column: Interactive Glass Form -->
<div class="contact-form-wrap">
<form class="contact-form" onsubmit="event.preventDefault(); alert('Message sent successfully!');">
<h3 class="form-title">Send us a message</h3>
<p class="form-desc">Fill in the details below and we will get back to you promptly.</p>
<div class="form-row">
<div class="form-group">
<label for="c-name">Full Name</label>
<input type="text" id="c-name" required placeholder="Alex Morgan" class="form-input" />
</div>
<div class="form-group">
<label for="c-email">Work Email</label>
<input type="email" id="c-email" required placeholder="alex@company.com" class="form-input" />
</div>
</div>
<div class="form-group">
<label for="c-subject">Subject / Inquiry Type</label>
<select id="c-subject" class="form-select">
<option value="general">General Question</option>
<option value="enterprise">Enterprise Custom Components</option>
<option value="bug">Bug Report / Issue</option>
<option value="partnership">Partnership & Sponsorship</option>
</select>
</div>
<div class="form-group">
<label for="c-message">Your Message</label>
<textarea id="c-message" required rows="4" placeholder="Tell us how we can help..." class="form-textarea"></textarea>
</div>
<button type="submit" class="submit-btn">
<span>Send Message</span>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>
</button>
</form>
</div>
</div>
</div>
</section>
</div>
<style>
.cq-contact-glass-form-cq { container-type: inline-size; }
.contact-section {
position: relative;
padding: var(--sp-20, 5rem) var(--sp-6, 1.5rem);
background: var(--c-bg-primary, #030712);
overflow: hidden;
}
.contact-bg {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 0;
}
.contact-glow {
position: absolute;
top: 30%;
right: 15%;
width: 550px;
height: 550px;
background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
filter: blur(120px);
}
.container {
position: relative;
z-index: 1;
max-width: 1200px;
margin: 0 auto;
}
.contact-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4rem;
align-items: center;
}
.contact-badge {
display: inline-flex;
padding: 0.35rem 0.9rem;
border-radius: 9999px;
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
background: color-mix(in srgb, var(--c-primary, #b8860b) 12%, transparent);
color: #eab308;
border: 1px solid rgba(234, 179, 8, 0.25);
margin-bottom: var(--sp-4, 1rem);
}
.contact-title {
font-size: clamp(2rem, 4vw, 2.8rem);
font-weight: 900;
color: #fff;
line-height: 1.2;
letter-spacing: -0.02em;
margin: 0 0 1rem;
}
.contact-subtitle {
font-size: 1.05rem;
color: #94a3b8;
line-height: 1.6;
margin: 0 0 2rem;
}
.sla-badge {
display: inline-flex;
align-items: center;
gap: 0.6rem;
padding: 0.5rem 1rem;
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.25);
border-radius: 9999px;
font-size: 0.82rem;
color: #cbd5e1;
margin-bottom: 2.5rem;
}
.sla-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #10b981;
box-shadow: 0 0 8px #10b981;
}
.channels-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.channel-card {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem 1.25rem;
background: rgba(15, 23, 42, 0.5);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.06);
border-radius: 14px;
backdrop-filter: blur(10px);
}
.channel-icon {
width: 40px;
height: 40px;
border-radius: 10px;
background: rgb(var(--ink-rgb, 255 255 255) / 0.05);
color: #eab308;
display: flex;
align-items: center;
justify-content: center;
}
.channel-details {
display: flex;
flex-direction: column;
}
.channel-label {
font-size: 0.75rem;
color: #64748b;
font-weight: 600;
}
.channel-link {
font-size: 0.92rem;
color: #cbd5e1;
text-decoration: none;
font-weight: 600;
transition: color 0.2s ease;
}
.channel-link:hover {
color: #fff;
}
/* Form */
.contact-form {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(24px);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
border-radius: var(--r-2xl, 24px);
padding: clamp(1.75rem, 4vw, 2.5rem);
box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.7);
}
.form-title {
font-size: 1.4rem;
font-weight: 800;
color: #fff;
margin: 0 0 0.4rem;
}
.form-desc {
font-size: 0.88rem;
color: #94a3b8;
margin: 0 0 1.75rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.4rem;
margin-bottom: 1.25rem;
}
.form-group label {
font-size: 0.82rem;
font-weight: 600;
color: #cbd5e1;
}
.form-input, .form-select, .form-textarea {
width: 100%;
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.35);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
border-radius: 10px;
color: #fff;
font-size: 0.92rem;
font-family: inherit;
outline: none;
box-sizing: border-box;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
border-color: #eab308;
box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}
.form-select option {
background: #0f172a;
color: #fff;
}
.submit-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.85rem 1.5rem;
background: linear-gradient(135deg, #eab308, #d97706);
border: none;
border-radius: 10px;
color: #000;
font-size: 0.95rem;
font-weight: 700;
cursor: pointer;
transition: all 0.25s ease;
box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}
.submit-btn:hover {
filter: brightness(1.1);
box-shadow: 0 6px 20px rgba(234, 179, 8, 0.45);
}
@container (max-width: 960px) {
.contact-grid {
grid-template-columns: 1fr;
gap: 3rem;
}
}
@container (max-width: 640px) {
.form-row {
grid-template-columns: 1fr;
}
}
</style> ---
/**
* ContactGlassForm — Full-page interactive contact and support section with glassmorphism form and live channel indicators.
*
* @param {string} badge - Eyebrow badge text.
* @param {string} title - Section main heading.
* @param {string} subtitle - Description text.
*/
interface Props {
badge?: string;
title?: string;
subtitle?: string;
className?: string;
}
const {
badge = "Get In Touch",
title = "Let's Build Something Exceptional Together",
subtitle = "Have a question, custom component inquiry, or need enterprise support? Our team is here to assist.",
className = ""
} = Astro.props;
---
<div class="cq-contact-glass-form-cq">
<section class={`contact-section ${className}`} aria-labelledby="contact-title">
<div class="contact-bg" aria-hidden="true">
<div class="contact-glow"></div>
</div>
<div class="container">
<div class="contact-grid">
<!-- Left Column: Info & Channels -->
<div class="contact-info">
{badge && <span class="contact-badge">{badge}</span>}
<h2 id="contact-title" class="contact-title">{title}</h2>
<p class="contact-subtitle">{subtitle}</p>
<!-- Response SLA Badge -->
<div class="sla-badge">
<span class="sla-dot"></span>
<span>Average response time: <strong>under 2 hours</strong></span>
</div>
<!-- Channels List -->
<div class="channels-list">
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Direct Email</span>
<a href="mailto:support@astrocomponents.dev" class="channel-link">support@astrocomponents.dev</a>
</div>
</div>
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Open Source GitHub</span>
<a href="https://github.com" target="_blank" rel="noopener" class="channel-link">github.com/astro-components</a>
</div>
</div>
<div class="channel-card">
<div class="channel-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
</div>
<div class="channel-details">
<span class="channel-label">Community Discord</span>
<a href="https://discord.com" target="_blank" rel="noopener" class="channel-link">discord.gg/astro-components</a>
</div>
</div>
</div>
</div>
<!-- Right Column: Interactive Glass Form -->
<div class="contact-form-wrap">
<form class="contact-form" onsubmit="event.preventDefault(); alert('Message sent successfully!');">
<h3 class="form-title">Send us a message</h3>
<p class="form-desc">Fill in the details below and we will get back to you promptly.</p>
<div class="form-row">
<div class="form-group">
<label for="c-name">Full Name</label>
<input type="text" id="c-name" required placeholder="Alex Morgan" class="form-input" />
</div>
<div class="form-group">
<label for="c-email">Work Email</label>
<input type="email" id="c-email" required placeholder="alex@company.com" class="form-input" />
</div>
</div>
<div class="form-group">
<label for="c-subject">Subject / Inquiry Type</label>
<select id="c-subject" class="form-select">
<option value="general">General Question</option>
<option value="enterprise">Enterprise Custom Components</option>
<option value="bug">Bug Report / Issue</option>
<option value="partnership">Partnership & Sponsorship</option>
</select>
</div>
<div class="form-group">
<label for="c-message">Your Message</label>
<textarea id="c-message" required rows="4" placeholder="Tell us how we can help..." class="form-textarea"></textarea>
</div>
<button type="submit" class="submit-btn">
<span>Send Message</span>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>
</button>
</form>
</div>
</div>
</div>
</section>
</div>
<style>
.cq-contact-glass-form-cq { container-type: inline-size; }
.contact-section {
position: relative;
padding: var(--sp-20, 5rem) var(--sp-6, 1.5rem);
background: var(--c-bg-primary, #030712);
overflow: hidden;
}
.contact-bg {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 0;
}
.contact-glow {
position: absolute;
top: 30%;
right: 15%;
width: 550px;
height: 550px;
background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
filter: blur(120px);
}
.container {
position: relative;
z-index: 1;
max-width: 1200px;
margin: 0 auto;
}
.contact-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4rem;
align-items: center;
}
.contact-badge {
display: inline-flex;
padding: 0.35rem 0.9rem;
border-radius: 9999px;
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
background: color-mix(in srgb, var(--c-primary, #b8860b) 12%, transparent);
color: #eab308;
border: 1px solid rgba(234, 179, 8, 0.25);
margin-bottom: var(--sp-4, 1rem);
}
.contact-title {
font-size: clamp(2rem, 4vw, 2.8rem);
font-weight: 900;
color: #fff;
line-height: 1.2;
letter-spacing: -0.02em;
margin: 0 0 1rem;
}
.contact-subtitle {
font-size: 1.05rem;
color: #94a3b8;
line-height: 1.6;
margin: 0 0 2rem;
}
.sla-badge {
display: inline-flex;
align-items: center;
gap: 0.6rem;
padding: 0.5rem 1rem;
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.25);
border-radius: 9999px;
font-size: 0.82rem;
color: #cbd5e1;
margin-bottom: 2.5rem;
}
.sla-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #10b981;
box-shadow: 0 0 8px #10b981;
}
.channels-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.channel-card {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem 1.25rem;
background: rgba(15, 23, 42, 0.5);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.06);
border-radius: 14px;
backdrop-filter: blur(10px);
}
.channel-icon {
width: 40px;
height: 40px;
border-radius: 10px;
background: rgb(var(--ink-rgb, 255 255 255) / 0.05);
color: #eab308;
display: flex;
align-items: center;
justify-content: center;
}
.channel-details {
display: flex;
flex-direction: column;
}
.channel-label {
font-size: 0.75rem;
color: #64748b;
font-weight: 600;
}
.channel-link {
font-size: 0.92rem;
color: #cbd5e1;
text-decoration: none;
font-weight: 600;
transition: color 0.2s ease;
}
.channel-link:hover {
color: #fff;
}
/* Form */
.contact-form {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(24px);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
border-radius: var(--r-2xl, 24px);
padding: clamp(1.75rem, 4vw, 2.5rem);
box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.7);
}
.form-title {
font-size: 1.4rem;
font-weight: 800;
color: #fff;
margin: 0 0 0.4rem;
}
.form-desc {
font-size: 0.88rem;
color: #94a3b8;
margin: 0 0 1.75rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.4rem;
margin-bottom: 1.25rem;
}
.form-group label {
font-size: 0.82rem;
font-weight: 600;
color: #cbd5e1;
}
.form-input, .form-select, .form-textarea {
width: 100%;
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.35);
border: 1px solid rgb(var(--ink-rgb, 255 255 255) / 0.1);
border-radius: 10px;
color: #fff;
font-size: 0.92rem;
font-family: inherit;
outline: none;
box-sizing: border-box;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
border-color: #eab308;
box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}
.form-select option {
background: #0f172a;
color: #fff;
}
.submit-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.85rem 1.5rem;
background: linear-gradient(135deg, #eab308, #d97706);
border: none;
border-radius: 10px;
color: #000;
font-size: 0.95rem;
font-weight: 700;
cursor: pointer;
transition: all 0.25s ease;
box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}
.submit-btn:hover {
filter: brightness(1.1);
box-shadow: 0 6px 20px rgba(234, 179, 8, 0.45);
}
@container (max-width: 960px) {
.contact-grid {
grid-template-columns: 1fr;
gap: 3rem;
}
}
@container (max-width: 640px) {
.form-row {
grid-template-columns: 1fr;
}
}
</style>
Краткая информация
- Категория
- Секции страниц
- Имя файла
ContactGlassForm.astro- Зависимости
- Нет — чистый Astro + CSS
- Теги
- contactformsupportchannelsinquiry