npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@liverkp/vue

v0.1.1

Published

Vue 3 components for Liver Knowledge Portal

Readme

@liverkp/vue

Vue 3 components for Liver Knowledge Portal using Composition API with <script setup>.

📦 Installation

Using pnpm:

pnpm add @liverkp/vue @liverkp/core

Using npm:

npm install @liverkp/vue @liverkp/core

Peer Dependencies:

  • Vue 3.3+
  • @liverkp/core

🚀 Quick Start

<script setup>
import { LkpLayout } from '@liverkp/vue';
import { cfdeLogo, liverLogo } from '@liverkp/core/assets';

const headerConfig = {
  logo: { src: cfdeLogo, alt: 'CFDE Logo', href: '/' },
  secondaryLogo: { src: liverLogo, alt: 'Liver Portal' },
  title: {
    primary: 'Liver<br>Knowledge Portal',
    secondary: 'CFDE'
  },
  topMenuItems: [
    { label: 'Login', href: '/login' },
    { label: 'Search', href: '/search' }
  ]
};

const menuItems = [
  { label: 'Home', href: '/' },
  { label: 'About', href: '/about' },
  {
    label: 'Resources',
    children: [
      { label: 'Documentation', href: '/docs' },
      { label: 'API', href: '/api', external: true }
    ]
  }
];

const footerConfig = {
  description: 'The Liver Knowledge Portal provides access to liver disease data...',
  columns: [
    {
      title: 'About',
      links: [
        { label: 'About Us', href: '/about' },
        { label: 'Contact', href: '/contact' }
      ]
    },
    {
      title: 'Legal',
      links: [
        { label: 'Privacy Policy', href: '/privacy' },
        { label: 'Terms of Use', href: '/terms' }
      ]
    }
  ],
  institutions: [
    { name: 'NIH', logo: nihLogo, href: 'https://nih.gov', external: true }
  ],
  copyright: '© 2024 NIH Common Fund Data Ecosystem'
};
</script>

<template>
  <LkpLayout
    :header-config="headerConfig"
    :footer-config="footerConfig"
    :menu-items="menuItems"
  >
    <h1>Welcome</h1>
    <p>Your app content goes here...</p>
  </LkpLayout>
</template>

📚 Components

LkpLayout

Complete layout shell with header, navigation, footer, and content slot.

Props:

{
  headerConfig: HeaderConfig;
  footerConfig: FooterConfig;
  menuItems: NavMenuItem[];
}

Slots:

  • Default slot: Main content area

Features:

  • Skip-to-content link for accessibility
  • <main> with role="main" and id="lkp-main-content"

LkpHeader

Header with logo(s), title, and navigation menu slot.

Props:

{
  config: HeaderConfig;
}

Slots:

  • Default slot: Typically for <LkpNavMenu>

Features:

  • role="banner" for accessibility
  • Supports dual logos (primary + secondary)
  • HTML in title.primary (e.g., <br> for line breaks)

LkpNavMenu

Navigation menu with hamburger toggle, main menu, and top menu.

Props:

{
  items: NavMenuItem[];
  topMenuItems?: TopMenuItem[];
}

Features:

  • Hamburger menu for mobile responsiveness
  • Nested submenus support
  • ARIA attributes (aria-expanded, aria-haspopup)
  • Keyboard navigation (Tab, Enter, Escape)
  • External link indicators with screen reader text
  • Focus management

LkpFooter

Footer with columns, institutions, and copyright.

Props:

{
  config: FooterConfig;
}

Features:

  • role="contentinfo" for accessibility
  • Flexible column layout
  • Institution logos with links
  • External link handling

🎨 Styling

Components automatically import CSS from @liverkp/core/css. All classes use the lkp- prefix.

To customize, override CSS variables:

:root {
  --lkp-blue: #1a4d6b;  /* Darker blue */
  --lkp-lite-blue: #3a8dc9;
}

♿ Accessibility

All components follow WCAG 2.1 AA standards:

  • Semantic HTML (<header>, <nav>, <main>, <footer>)
  • ARIA roles and labels
  • Keyboard navigation support
  • Focus management
  • Skip-to-content link
  • Screen reader text for external links
  • Minimum 4.5:1 contrast ratios

🔧 Integration

Vite

// vite.config.js
import vue from '@vitejs/plugin-vue';

export default {
  plugins: [vue()]
};

Nuxt 3

<!-- app.vue or layout -->
<script setup>
import { LkpLayout } from '@liverkp/vue';
</script>

Vue CLI / Webpack

// main.js
import { createApp } from 'vue';
import App from './App.vue';

createApp(App).mount('#app');

📖 API Reference

Types (Re-exported from @liverkp/core)

import type {
  HeaderConfig,
  FooterConfig,
  NavMenuItem,
  TopMenuItem,
  Logo,
  FooterColumn,
  Institution
} from '@liverkp/vue';

🧪 Example: Custom Navigation

<script setup>
import { LkpHeader, LkpNavMenu, LkpFooter } from '@liverkp/vue';
import { ref } from 'vue';

const showBanner = ref(true);
</script>

<template>
  <div>
    <div v-if="showBanner" class="custom-banner">
      Important announcement here
    </div>

    <LkpHeader :config="headerConfig">
      <LkpNavMenu :items="menuItems" :top-menu-items="topMenuItems" />
    </LkpHeader>

    <main>
      <slot />
    </main>

    <LkpFooter :config="footerConfig" />
  </div>
</template>

🔗 Related Packages

📄 License

MIT