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

@duch-web/base-components

v1.1.1

Published

Base UI components for pharmaceutical websites

Downloads

5

Readme

@duch-web/base-components

Professional Nuxt 3 components for pharmaceutical and healthcare websites, built with Vue 3 and TailwindCSS.

📦 Installation

npm install @duch-web/base-components

🚀 Quick Setup

// nuxt.config.js
export default defineNuxtConfig({
  modules: ['@duch-web/base-components/nuxt']
})

Now use components anywhere without imports!

📋 Components Menu


BaseButton

Smart button that automatically renders as <button>, <NuxtLink>, or <a> based on props.

Usage Examples

<!-- Internal navigation -->
<BaseButton to="/about">About Us</BaseButton>

<!-- External link -->
<BaseButton href="https://example.com">Visit Site</BaseButton>

<!-- Form button -->
<BaseButton type="submit" @click="handleSubmit">Submit</BaseButton>

<!-- Custom styling -->
<BaseButton 
  to="/contact" 
  bg="bg-red-500" 
  bgHover="bg-red-600"
  color="text-white"
>
  Contact Us
</BaseButton>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | to | String | - | NuxtLink route (makes it a router link) | | href | String | - | External URL (makes it an anchor tag) | | type | String | "button" | Button type (button, submit, reset) | | bg | String | CSS var | Background color class | | bgHover | String | CSS var | Hover background color class | | color | String | CSS var | Text color class | | disabled | Boolean | false | Disabled state | | class | String | "" | Additional CSS classes |

How it works: The component automatically chooses the right HTML element based on your props:

  • Has to? → Renders as <NuxtLink>
  • Has href? → Renders as <a>
  • Neither? → Renders as <button>

BaseHamburgerButton

Animated hamburger menu button for mobile navigation with smooth transitions.

Usage Examples

<template>
  <BaseHamburgerButton 
    :active="menuOpen" 
    @click="toggleMenu"
  />
  
  <!-- Custom colors -->
  <BaseHamburgerButton 
    :active="menuOpen" 
    @click="toggleMenu"
    bg-color="bg-navy-500"
    text-color="text-white"
  />
  
  <!-- French language -->
  <BaseHamburgerButton 
    :active="menuOpen" 
    @click="toggleMenu"
    lang="fr"
  />
</template>

<script setup>
const menuOpen = ref(false)

const toggleMenu = () => {
  menuOpen.value = !menuOpen.value
}
</script>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | active | Boolean | false | Active/open state (animates the icon) | | bgColor | String | CSS var | Background color class | | textColor | String | CSS var | Line color class | | lang | String | "en" | Language for aria-label (en/fr) |

Animation: Smoothly transforms from hamburger (☰) to X (✕) when active.


BaseImage

Enhanced image component with lazy loading, responsive sizing, and styling options.

Usage Examples

<!-- Basic image -->
<BaseImage src="/hero.jpg" alt="Hero image" />

<!-- Styled image -->
<BaseImage 
  src="/logo.png" 
  alt="Company Logo"
  rounded="full"
  shadow="lg"
  loading="eager"
/>

<!-- Responsive image -->
<BaseImage 
  src="/banner.jpg" 
  alt="Banner"
  width="800"
  height="400"
  rounded="xl"
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | src | String | Required | Image source URL | | alt | String | Required | Alt text for accessibility | | loading | String | "lazy" | Loading strategy (lazy, eager) | | width | String/Number | - | Image width | | height | String/Number | - | Image height | | rounded | String | "" | Border radius (sm, md, lg, xl, 2xl, full) | | shadow | String | "" | Drop shadow (sm, md, lg, xl, 2xl) | | class | String | "" | Additional CSS classes |

Features: Automatic lazy loading, error handling, and responsive behavior.


BaseLinkIcon

Link component with trailing icons for enhanced navigation UX.

Usage Examples

<!-- Internal link with arrow -->
<BaseLinkIcon 
  to="/products" 
  text="View Products"
  icon="arrow-right"
/>

<!-- External link -->
<BaseLinkIcon 
  href="https://example.com" 
  text="External Site"
  icon="external"
/>

<!-- Download link -->
<BaseLinkIcon 
  href="/brochure.pdf" 
  text="Download Brochure"
  icon="download"
/>

<!-- Custom styling -->
<BaseLinkIcon 
  to="/services" 
  text="Our Services"
  classColor="text-blue-500"
  classColorOver="text-blue-700"
/>

<!-- Using slot for custom text -->
<BaseLinkIcon to="/about" icon="arrow-right">
  Learn More About Us
</BaseLinkIcon>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | to | String | - | NuxtLink route (internal navigation) | | href | String | - | External URL or file path | | text | String | - | Link text (can also use default slot) | | icon | String | "arrow-right" | Icon type (arrow-right, external, download) | | classColor | String | CSS var | Default color class | | classColorOver | String | CSS var | Hover color class | | class | String | "" | Additional CSS classes |

Animation: Icon slides right on hover for enhanced interaction feedback.


BaseMailto

Email link component that generates proper mailto: URLs with advanced options.

Usage Examples

<!-- Simple email link -->
<BaseMailto email="[email protected]" />

<!-- Email with subject and body -->
<BaseMailto 
  email="[email protected]"
  subject="Product Inquiry"
  body="Hello, I would like to know more about..."
/>

<!-- Advanced email with CC/BCC -->
<BaseMailto 
  email="[email protected]"
  subject="Quote Request"
  cc="[email protected]"
  bcc="[email protected]"
  :show-icon="false"
>
  Request Quote
</BaseMailto>

<!-- Custom styling -->
<BaseMailto 
  email="[email protected]"
  class="text-blue-500 hover:text-blue-700 font-semibold"
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | email | String | Required | Email address (validated) | | subject | String | - | Email subject line | | body | String | - | Email body text | | cc | String | - | Carbon copy recipients | | bcc | String | - | Blind carbon copy recipients | | showIcon | Boolean | true | Show email icon | | class | String | CSS var | Link styling classes |

Features: Automatic email validation, URL encoding, and customizable styling.


BaseVimeo

Responsive Vimeo video embed with loading states and player controls.

Usage Examples

<!-- Basic video -->
<BaseVimeo video-id="123456789" />

<!-- Custom aspect ratio -->
<BaseVimeo 
  video-id="123456789"
  aspect-ratio="4:3"
/>

<!-- Video with autoplay -->
<BaseVimeo 
  video-id="123456789"
  :autoplay="true"
  :muted="true"
  :loop="true"
/>

<!-- Square video -->
<BaseVimeo 
  video-id="123456789"
  aspect-ratio="1:1"
  :controls="false"
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | videoId | String | Required | Vimeo video ID | | width | String/Number | "100%" | Video width | | height | String/Number | 315 | Video height | | title | String | "Vimeo video player" | Video title for accessibility | | aspectRatio | String | "16:9" | Aspect ratio (16:9, 4:3, 1:1) | | autoplay | Boolean | false | Auto-play video | | loop | Boolean | false | Loop video | | muted | Boolean | false | Mute audio | | controls | Boolean | true | Show player controls | | class | String | "" | Additional CSS classes |

Features: Loading states, error handling with retry, responsive design, and full Vimeo player API support.


🎨 Styling & Theming

Components use CSS custom properties for colors, making them adaptable to any design system:

/* Default colors (included in package) */
:root {
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-on-primary: #ffffff;
}

/* Override with brand colors */
:root {
  --color-primary: #193153;        /* Navy */
  --color-primary-hover: #0f1f35;  /* Darker Navy */
  --color-on-primary: #ffffff;     /* White text */
}

Import the default styles:

import '@duch-web/base-components/style.css'

🔧 Development

# Install dependencies
npm install

# Build for production
npm run build

# Development mode with watch
npm run dev

📄 License

MIT License - Open source and free to use.