@classed/solid
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

classed

license version size downloads

@classed/solid

Introduction

Classed components for Solid.

Installation

npm install @classed/solid
# or
yarn add @classed/solid
# or
pnpm add @classed/solid
# or
bun add @classed/solid

Examples

basic

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>;

custom concatenation

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>;

Authors

github

License

MIT License

Package Sidebar

Install

npm i @classed/solid

Weekly Downloads

115

Version

0.2.0

License

MIT

Unpacked Size

6.35 kB

Total Files

7

Last publish

Collaborators

  • flamrdevs