Classed components for Solid.
npm install @classed/solid
# or
yarn add @classed/solid
# or
pnpm add @classed/solid
# or
bun add @classed/solid
with classed utils cx
import classed from "@classed/solid";
// components
const Button = classed("button", "btn", "btn-primary", "btn-medium");
// render
<Button class={["extra", "class" /* any cx ClassedClassValue */]}>button</Button>;
with clsx
import { create } from "@classed/solid";
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>;