Socket
Socket
Sign inDemoInstall

@modulz/radix-system

Package Overview
Dependencies
5
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @modulz/radix-system

Radix System Library


Version published
Weekly downloads
175
increased by12.9%
Maintainers
4
Install size
3.16 MB
Created
Weekly downloads
 

Readme

Source

WIP

Radix System

yarn add @modulz/radix-system
Theme-aware responsive style props for building design systems

Built on top of @styled-system/core by Brent Jackson.

Install it

Radix System is currently under development, but if you'd like to use it anyway:

# npm
npm install @modulz/radix-system
# yarn
yarn add @modulz/radix-system

Features

Radix System is an alternative to Styled System, built on the same Core package but with a few tweaks:

  • Typescript support
  • style functions are independent
  • color style function has been renamed to textColor
  • space has been split into margin and space
  • Theme-aware variant API

Use it

Import style functions:

import styled from 'styled-components';
import { margin, backgroundColor, compose } from '@modulz/radix-system';

const styleProps = compose(
  margin,
  backgroundColor
);
const Box = styled('div')(styleProps);

const App = () => (
  <Box my={4} bg="blue">
    Hey there 👋
  </Box>
);

With Typescript:

import styled from 'styled-components';
import {
  margin,
  MarginProps,
  backgroundColor,
  BackgroundColorProps,
  compose,
} from '@modulz/radix-system';

const styleProps = compose(
  margin,
  backgroundColor
);
type BoxProps = MarginProps & BackgroundColorProps;
const Box = styled('div') < BoxProps > styleProps;

const App = () => (
  <Box my={4} bg="blue">
    Hey there 👋
  </Box>
);

Docs

Proper docs coming soon.


License

MIT © Modulz

FAQs

Last updated on 28 Apr 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc