@classed/vue
@classed/vue
Introduction
Classed components for Vue.
Installation
npm install @classed/vue
# or
yarn add @classed/vue
# or
pnpm add @classed/vue
# or
bun add @classed/vue
Examples
basic
with classed utils cx
import classed from "@classed/vue";
// components
const Button = classed("button", "btn", "btn-primary", "btn-medium");
// render
<Button class={["extra", "class" /* any cx ClassedClassValue */]}>button</Button>;
custom concatenation
with clsx
import { create } from "@classed/vue";
import clsx from "clsx";
const classed = create({ cx: clsx });
// components
const Button = classed("button", "btn", "btn-primary", "btn-medium");
// render
<Button class={["extra", "class" /* any clsx ClassValue */]}>button</Button>;
Authors
License
Related Packages
vue-class-clsx
A plugin that supports writing class modules in vuejs quickly and easily similar...
1,734
5
vue-class-migrator
CLI tool to help migrating vue class components to vue 3 compatible components.
2,840
71
Version History
| Version | Released | License |
|---|---|---|
| 0.2.0 | MIT | |
| 0.1.0 | MIT | |
| 0.0.0 | MIT |