All Projects → rosebox → Rosebox

rosebox / Rosebox

Licence: mit
CSS in Typescript

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Rosebox

Polished
A lightweight toolset for writing styles in JavaScript ✨
Stars: ✭ 7,074 (+11309.68%)
Mutual labels:  css-in-js
Shadow
collection of useful CLJS code
Stars: ✭ 47 (-24.19%)
Mutual labels:  css-in-js
Snackui
SnackUI 🍑 - the final React style library. With an *optimizing compiler* that lets you write views naturally, with easier DX, working on native and web at once, all while being faster than hand-rolling your own CSS.
Stars: ✭ 55 (-11.29%)
Mutual labels:  css-in-js
Linaria
Zero-runtime CSS in JS library
Stars: ✭ 8,443 (+13517.74%)
Mutual labels:  css-in-js
Postjss
Use the power of PostCSS in compiling with JSS
Stars: ✭ 40 (-35.48%)
Mutual labels:  css-in-js
Bankai
🚉 - friendly web compiler
Stars: ✭ 1,064 (+1616.13%)
Mutual labels:  css-in-js
Styled System
⬢ Style props for rapid UI development
Stars: ✭ 7,126 (+11393.55%)
Mutual labels:  css-in-js
Css In Js Utils
Useful utility functions for CSS in JS solutions
Stars: ✭ 61 (-1.61%)
Mutual labels:  css-in-js
Emotion Module
💖 Emotion module for Nuxt.js
Stars: ✭ 47 (-24.19%)
Mutual labels:  css-in-js
Atomize
library for creating atomic react components
Stars: ✭ 54 (-12.9%)
Mutual labels:  css-in-js
Styled Components
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
Stars: ✭ 35,473 (+57114.52%)
Mutual labels:  css-in-js
Cattous
CSS in JSX for lazy developers, built using styled-components and styled-system
Stars: ✭ 38 (-38.71%)
Mutual labels:  css-in-js
Twind
The smallest, fastest, most feature complete Tailwind-in-JS solution in existence.
Stars: ✭ 1,051 (+1595.16%)
Mutual labels:  css-in-js
React Postcss
Simple style tag for React
Stars: ✭ 9 (-85.48%)
Mutual labels:  css-in-js
Cabana React
A design system built especially for both Sketch and React. 💎⚛️
Stars: ✭ 58 (-6.45%)
Mutual labels:  css-in-js
Ui Box
Blazing Fast React UI Primitive
Stars: ✭ 847 (+1266.13%)
Mutual labels:  css-in-js
Treat
🍬 Themeable, statically extracted CSS‑in‑JS with near‑zero runtime.
Stars: ✭ 1,058 (+1606.45%)
Mutual labels:  css-in-js
Vue Styled Components
Visual primitives for the component age. A simple port for Vue of styled-components 💅
Stars: ✭ 1,114 (+1696.77%)
Mutual labels:  css-in-js
Tailwind Styled Component
Create Tailwind CSS React components like styled components with class names on multiple lines and conditional class rendering
Stars: ✭ 57 (-8.06%)
Mutual labels:  css-in-js
Styled Theming
Create themes for your app using styled-components
Stars: ✭ 1,067 (+1620.97%)
Mutual labels:  css-in-js

Node.js CI

portfolio_view

CSS in Typescript

Rosebox is a CSS-in-Typescript library that provides features like:

  • Support for high-quality autocomplete.
  • Support for color highlighting and color pickers.
  • Strong types (e.g., Length).
  • Typed functions (e.g., linGrad).
  • Extra shorthand properties(e.g., marginX, paddingX).
  • An object-based syntax for the values of complex properties (e.g., animation).

Rosebox uses the packages jss and react-jss under the hood in @rosebox/react to support runtime generation of CSS-classes and other features.

Usage

  1. Install the following packages:
npm i @rosebox/core @rosebox/react
  1. Install the VScode-extension.

  2. Write your styles in files that match the pattern *.rb.ts.

Example

Here is a simple example of how you can use rosebox in your react-app:

import * as React from "react";
import { rgb, px, ms } from "@rosebox/core";
import { createUseStyles, StylesProvider } from "@rosebox/react";

const useStyles = createUseStyles({
  titleStyle: {
    fontSize: px(48),
    transition: ["color", ms(150), "ease-in-out"],
    color: "black",
    "&query": {
      "&:nth-child(2)": {
        fontSize: px(32)
      },
      "&:hover": {
        color: rgb(239, 71, 111)
      }
    }
  }
});

const MyComponent = () => {
  const classes = useStyles();
  return (
    <div className="App">
      <h1 className={classes.titleStyle}>Hover over me please</h1>
      <h1 className={classes.titleStyle}>I come next</h1>
    </div>
  );
};

export default function App() {
  const classes = useStyles();
  return (
    <StylesProvider>
      <MyComponent />
    </StylesProvider>
  );
}

Docs

Demos

IMPORTANT NOTE 📢

You can already use all the CSS properties with Rosebox. Missing ones in the api only indicate that they are not YET strongly typed. The library exposes all the weakly-typed properties by prefixing them with an underscore (e.g., _borderImageStyle, _all). These weakly-typed props have type string. When a property becomes strongly-typed, its underscore-prefixed version gets deprecated immediately. However, its removal may only be considered after a minimum of 1 major release since the deprecation—for example, if _borderImageStyle gets deprecated in 0.6.4, it means that it will be removed in 1.0.0.

VScode extension 📟

There is a new VScode-extension for rosebox, which enhances the IDE experience by providing features like color highlighting and color pickers.

Roadmap and future releases

Refer to milestones for information about future releases.

Help and questions 🙋

If you have a question or need help, feel free to create an issue here 👌.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].