🎐Kaze Style
Kaze [風] zero-runtime CSS in JS for React.
🚧 Kaze Style is under development 🚧
Feature
🛠 KazeStyle can choose when to extract css. (build time & run time)
💪 Type-safe styles via csstype
🦷 Reuse styles using Atomic CSS
👘 Can ignore specificity and merge styles
🎨 Consistent styling using "@kaze-style/themes" (under development)
Example
createStyle
import { createStyle } from '@kaze-style/react';
const classes = createStyle({
button: {
color: 'red',
},
});
const Button = () => {
return <button className={classes.button}>button</button>;
};
mergeStyle
import { createStyle, mergeStyle } from '@kaze-style/react';
const classes = createStyle({
red: {
color: 'red',
},
});
const Button = (props) => {
return (
<button className={mergeStyle(classes.red, props.className)}>button</button>
);
};
import { createStyle } from '@kaze-style/react';
import { Button } from '@kaze-style/react';
const classes = createStyle({
blue: {
color: 'blue',
},
});
const Component = () => {
return <Button className={classes.blue} />;
};
createGlobalStyle
import { createGlobalStyle } from '@kaze-style/react';
createGlobalStyle({
html: {
color: 'red',
},
});
const App = () => {
return <div></div>;
};
import { withKazeStyle } from '@kaze-style/next-plugin';
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