百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

css-constructor

> 前端框架
开源

用于 React 组件的 CSS 构造器

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 React 组件的 CSS 构造器

 

Every React component gets an inbuilt javascript constructor for functional logic.

Introducing the css constructor for styling!

   

…

--

Other features

Uses classes instead of inline styles

Editable in developer tools

Super tiny: only 1.2K gzipped!

Official library emoji

Coming soon

server side rendering

--

Usage

  1. npm install css-constructor --save

  2. import css from 'css-constructor'

  3. Add a @css block just before the render function (important)

  4. Add transform-decorators-legacy as the first plugin in your .babelrc (already downloaded with ).

If you are not familiar with babel plugins you can follow the detailed instructions here.

Or, if you would prefer using without adding the babel transform for decorators, up-vote this issue.

--

How does it work?

uses ES7 class method decorators on the render function. Detailed post coming soon.

Inspiration

Heavily inspired from glamor, styled-components and radium

Special thanks to thysultan. stylis is the bomb!

Support

⭐️ this repo!

Issues· 3 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptcss-in-jsdecoratorsreact

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架