Added <PillNav /> Component

This commit is contained in:
Utkarsh-Singhal-26
2025-08-13 23:59:16 +05:30
parent 1ebff8aef0
commit d341c73210
6 changed files with 667 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
// Highlighted sidebar items
export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal'];
export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal', 'Pill Nav'];
export const UPDATED = [];
// Used for main sidebar navigation
@@ -66,6 +66,7 @@ export const CATEGORIES = [
'Magic Bento',
'Scroll Stack',
'Profile Card',
'Pill Nav',
'Dock',
'Gooey Nav',
'Pixel Card',

View File

@@ -54,6 +54,7 @@ const components = {
'magic-bento': () => import('../demo/Components/MagicBentoDemo.vue'),
'profile-card': () => import('../demo/Components/ProfileCardDemo.vue'),
'dock': () => import('../demo/Components/DockDemo.vue'),
'pill-nav': () => import('../demo/Components/PillNavDemo.vue'),
'gooey-nav': () => import('../demo/Components/GooeyNavDemo.vue'),
'pixel-card': () => import('../demo/Components/PixelCardDemo.vue'),
'carousel': () => import('../demo/Components/CarouselDemo.vue'),

View File

@@ -0,0 +1,30 @@
import code from '@content/Components/PillNav/PillNav.vue?raw';
import { createCodeObject } from '../../../types/code';
export const pillNav = createCodeObject(code, 'Components/PillNav', {
installation: `npm install gsap`,
usage: `<template>
<PillNav
:logo="logo"
logoAlt="Company Logo"
:items="[
{ label: 'Home', href: '/' },
{ label: 'About', href: '/about' },
{ label: 'Services', href: '/services' },
{ label: 'Contact', href: '/contact' }
]"
activeHref="/"
class="custom-nav"
ease="power2.easeOut"
baseColor="#000000"
pillColor="#ffffff"
hoveredPillTextColor="#ffffff"
pillTextColor="#000000"
/>
</template>
<script setup lang="ts">
import PillNav from "./PillNav.vue";
import logo from '/path/to/logo.svg';
</script>`
});