New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@iuroc/vanjs-plugin

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

@iuroc/vanjs-plugin

A lightweight plugin for van.js adding CSS utilities, reactive style support, color palette, and state detection.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

vanjs-plugin

A lightweight plugin for van.js adding CSS utilities, reactive style support, color palette, and state detection.

Installation

pnpm add @iuroc/vanjs-plugin

Usage

import van from 'vanjs-core'
import '@iuroc/vanjs-plugin'

const { div } = van.tags

const App = div({
  style: van.css({ color: 'red' }),
}, 'Hello Van.js')

van.add(document.body, App())

Examples

van.style

Apply styles to an element. Supports reactive style updates via a function.

If a function is provided, the styles will be re-applied reactively whenever dependencies change.

van.style(
  {
    color: 'red',
    textAlign: 'center',
  },
  document.body,
)

van.css

Generate a CSS string from a style object.

div(
  {
    style: van.css({
      color: 'red',
      textAlign: 'center',
    }),
  },
  'Hello Van.js',
)

van.isState

Type guard to check if a value is a VanJS State object.

const message = van.state('Hello World')

van.isState(message) // true
van.isState(123)     // false

van.color

Bootstrap V5 based color scheme.

van.color.primary.main    // #0d6efd
van.color.primary.bg      // #cfe2ff
van.color.primary.text    // #052c65
van.color.primary.border  // #9ec5fe
van.color.pink            // #d63384
van.color.gray[100]       // #f8f9fa
van.color.gray.default    // #6c757d

FAQs

Package last updated on 08 Nov 2025

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