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

kcplf-header

v0.3.38

Published

Header component for KCPLF projects

Readme

KCPLF Header 컴포넌트

Vue 3로 개발된 헤더 컴포넌트 라이브러리입니다. Nuxt와 Vue 3 프로젝트에서 사용할 수 있습니다.

설치

npm install kcplf-header
# 또는
yarn add kcplf-header

사용 방법

Vue 프로젝트에서 사용하기

<template>
  <KcplfHeader
    :userName="userName"
    :memberRole="memberRole"
    :bizNm="bizNm"
    linkType="router"
    @logout="handleLogout"
  />
</template>

<script setup>
import { KcplfHeader } from "kcplf-header";

const userName = "홍길동";
const memberRole = "세무사";
const bizNm = "플랫폼세무회계사무소";

const handleLogout = () => {
  // 로그아웃 처리 로직
  console.log("로그아웃");
};
</script>

Nuxt 프로젝트에서 사용하기

Nuxt 프로젝트에서도 설정은 동일합니다. linkType 프로퍼티는 "router"나 "nuxt" 둘 다 사용 가능하며, 내부적으로는 모두 Vue Router의 RouterLink를 사용합니다.

<template>
  <KcplfHeader
    :userName="userName"
    :memberRole="memberRole"
    :bizNm="bizNm"
    linkType="nuxt"
    @logout="handleLogout"
  />
</template>

<script setup>
import { KcplfHeader } from "kcplf-header";

const userName = "홍길동";
const memberRole = "세무사";
const bizNm = "플랫폼세무회계사무소";

const handleLogout = () => {
  // 로그아웃 처리 로직
  console.log("로그아웃");
};
</script>

참고: 내부적으로 모든 내비게이션 링크는 RouterLink를 사용합니다. Nuxt 애플리케이션에서도 RouterLink가 호환되므로 별도 설정 없이 작동합니다.

타입스크립트 지원 추가하기

Nuxt 프로젝트에서 타입 오류가 발생하는 경우, types 디렉토리에 다음과 같은 선언 파일을 추가하세요:

// types/kcplf-header.d.ts
declare module "kcplf-header" {
  import { DefineComponent } from "vue";

  export const KcplfHeader: DefineComponent<
    {
      userName: string;
      memberRole: string;
      bizNm: string;
      linkType?: "router" | "nuxt";
      logoPath?: string;
      logoTextPath?: string;
      memberIconPath?: string;
      arrowIconPath?: string;
      env?: string;
    },
    {},
    any
  >;
}

그리고 tsconfig.json에 타입 선언 파일을 포함시킵니다:

{
  "compilerOptions": {
    "types": ["kcplf-header"]
  },
  "files": ["types/kcplf-header.d.ts"]
}

커스텀 이미지 사용하기

컴포넌트에 포함된 기본 이미지 대신 커스텀 이미지를 사용할 수 있습니다:

<template>
  <KcplfHeader
    :userName="userName"
    :memberRole="memberRole"
    :bizNm="bizNm"
    :logoPath="logoPath"
    :logoTextPath="logoTextPath"
    :memberIconPath="memberIconPath"
    :arrowIconPath="arrowIconPath"
    linkType="nuxt"
    @logout="handleLogout"
  />
</template>

<script setup>
import { KcplfHeader } from "kcplf-header";

const userName = "홍길동";
const memberRole = "세무사";
const bizNm = "플랫폼세무회계사무소";

// 커스텀 이미지 경로
const logoPath = "/images/custom-logo.svg";
const logoTextPath = "/images/custom-logo-text.svg";
const memberIconPath = "/images/custom-member-icon.svg";
const arrowIconPath = "/images/custom-arrow-icon.svg";

const handleLogout = () => {
  // 로그아웃 처리 로직
  console.log("로그아웃");
};
</script>

Props

| 이름 | 타입 | 기본값 | 설명 | | -------------- | ------ | ----------- | --------------------------------------------- | | userName | String | "" | 사용자 이름 | | memberRole | String | "" | 사용자 역할 (예: 세무사) | | bizNm | String | "" | 회사/사무소 이름 | | linkType | String | "router" | 링크 타입 (내부적으로는 모두 RouterLink 사용) | | logoPath | String | 기본 이미지 | 로고 이미지 경로 | | logoTextPath | String | 기본 이미지 | 로고 텍스트 이미지 경로 | | memberIconPath | String | 기본 이미지 | 사용자 아이콘 이미지 경로 | | arrowIconPath | String | 기본 이미지 | 팝업 화살표 이미지 경로 |

Events

| 이름 | 설명 | | ------ | ------------------------------------- | | logout | 로그아웃 버튼 클릭 시 발생하는 이벤트 |

개발

# 의존성 설치
npm install

# 개발 서버 실행 (http://localhost:5173)
npm run dev

# 라이브러리 빌드
npm run build

배포

이 패키지는 npm 레지스트리에 배포되어 있으며, 다음 명령어로 설치할 수 있습니다:

npm install kcplf-header

npm 배포

배포 전에는 꼭 package.json의 버젼을 올려야됩니다.

npm login

npm run build
# kcplf-header 프로젝트에서
npm publish --tag latest

# 또는 이미 배포된 경우
npm dist-tag add [email protected] latest