Socket
Book a DemoInstallSign in
Socket

@classed/preact

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@classed/preact

Classed components for Preact

0.2.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

classed

license version size downloads

@classed/preact

Introduction

Classed components for Preact.

Installation

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

Examples

basic

with classed utils cx

import classed from "@classed/preact";

// 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/preact";

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

Keywords

class

FAQs

Package last updated on 19 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.