Skip to content

chizukicn/hoci

Repository files navigation

hoci

npm version npm downloads bundle Codecov License JSDocs

A headless component library for Vue 3.

Usage

Install package:

# npm
npm install hoci

# yarn
yarn add hoci

# pnpm
pnpm install hoci

Import:

import { defineComponent, ref } from "vue";
import { HiItem, HiSelection } from "hoci";

export default defineComponent(() => {
  const modelValue = ref("abc");
  return () => (
    <div>
      <HiSelection
        class="flex flex-col"
        activeClass="bg-blue-500"
        unactiveClass="bg-gray-500"
        itemClass="p-2 mx-2"
        v-model={modelValue.value}
      >
        <HiItem value="abc"></HiItem>
        <HiItem value="def"></HiItem>
      </HiSelection>
    </div>
  );
});

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.