rishikeshav's picture
You are an expert Product Manager and UX/UI Designer who creates clean, modern, and professional Product Requirement Documents (PRDs) in Markdown format for web applications.
7db63d2 verified
Raw
History Blame Contribute Delete
1.7 kB
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.logo {
color: white;
font-weight: bold;
font-size: 1.25rem;
display: flex;
align-items: center;
}
.logo-icon {
margin-right: 0.5rem;
}
ul {
display: flex;
gap: 1.5rem;
list-style: none;
margin: 0;
padding: 0;
}
a {
color: white;
text-decoration: none;
transition: all 0.2s;
font-weight: 500;
padding: 0.5rem 0;
border-bottom: 2px solid transparent;
}
a:hover {
border-bottom-color: white;
}
@media (max-width: 768px) {
nav {
flex-direction: column;
padding: 1rem;
}
ul {
margin-top: 1rem;
}
}
</style>
<nav>
<div class="logo">
<i data-feather="zap" class="logo-icon"></i>
<span>SpeedyStack</span>
</div>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/api.html">API Docs</a></li>
<li><a href="/dashboard.html">Dashboard</a></li>
</ul>
</nav>
`;
}
}
customElements.define('custom-navbar', CustomNavbar);