New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ctx-core/html

Package Overview
Dependencies
Maintainers
1
Versions
801
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctx-core/html

ctx-core html

  • 11.8.37
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

@ctx-core/html

Utility html functions.

class_

class_ has the same functionality as clsx yet is 94 B, or < 50% the size of clsx. It's also a good way to break up tailwind class usage...which is useful for reordering classes into logical groups.

This example uses relementjs, but any UI library can be used.

import { class_ } from '@ctx-core/html'
import { div_ } from 'relementjs/html'
div_({
  class: class_(
    ['foo', ['bar'], 0 && ['will-not-render']],
		{ 'font-bold': is_bold },
    'text-white',
		'bg-black')
}, 'Hello!')

This library is implemented in ctx-core which has 0 dependencies & has a wide breadth of modules. Importing class_ in the above example would look like:

import { class_ } from 'ctx-core/html'

More docs to come.

Keywords

FAQs

Package last updated on 25 Mar 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc