@classed/qwik
v0.2.0
Published
Classed components for Qwik
Downloads
436
Maintainers
Readme
@classed/qwik
Introduction
Classed components for Qwik.
Installation
npm install @classed/qwik
# or
yarn add @classed/qwik
# or
pnpm add @classed/qwik
# or
bun add @classed/qwik
Examples
basic
with classed utils cx
import classed from "@classed/qwik";
// 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/qwik";
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>;