Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kaze-style/core

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaze-style/core

Kaze [風] zero-runtime CSS in JS

  • 0.12.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Kaze

Kaze [風] zero-runtime CSS in JS for React.

🚧 under development 🚧


Features

  • Build - can choose when to extract css (build time & run time)
  • TypeScript - Type-safe styles via csstype
  • Minimal - 0.3kb runtime by build time extract
  • Merge - Style merging ignoring css specificity
  • Theme - Consistent styling using "@kaze-style/themes"

Example

import { createStyle, createGlobalStyle, mergeStyle } from '@kaze-style/react';

createGlobalStyle({
  html: {
    lineHeight: '1.5',
  },
});

const classes = createStyle({
  container: {
    margin: '20px',
  },
  base: {
    color: 'red',
    background: 'black',
  },
  action: {
    color: 'blue',
  },
});

export const App = ({ action }) => {
  return (
    <div className={classes.container}>
      <p className={mergeStyle(classes.base, action && classes.action)}></p>
    </div>
  );
};

Setup Next.js(build time extract)

//next.config.mjs
import { withKazeStyle } from '@kaze-style/next-plugin';

/** @type {import('next').NextConfig} */
const nextConfig = {};

export default withKazeStyle(nextConfig);

Inspiration

KazeStyle was designed with reference to several CSS in JS libraries.

microsoft/griffel

seek-oss/vanilla-extract

argyleink/open-props

callstack/linaria

Author

Taishi Naritomi

License

MIT

FAQs

Package last updated on 13 Dec 2022

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