@classed/vue

Classed components for Vue
12,242 4
Install
npm install @classed/vue
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Apr 19, 2024
Links: GitHub  ·  npm
Maintainer: flamrdevs

@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

MIT License

Related Packages

vue-bem-cn

BEM class name generator for Vue.JS

8,290 125
@verstaerker/vue-bem

A Vue.js directive and mixin to create BEM class names.

430 9
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