npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@soroush.tech/styled-system

v5.7.0

Published

Maintained, first-class-TypeScript rewrite of styled-system — responsive, theme-aware style props for CSS-in-JS. Drop-in replacement for styled-system v5.

Readme

@soroush.tech/styled-system

npm version npm downloads coverage unpacked size types included license

A maintained, first-class-TypeScript rewrite of styled-system v5 — responsive, theme-aware style props for CSS-in-JS.

It is a drop-in replacement for the styled-system runtime: the root export surface matches upstream verbatim, and the package ships its own types (replacing @types/styled-system).

Features

  • Add style props that hook into your own theme
  • Quickly set responsive font-size, margin, padding, width, and more with props
  • Influenced by constraint-based design-system principles
  • Typographic scale, and a spacing scale for margin and padding
  • Works with any color palette
  • Works with most CSS-in-JS libraries, including Emotion and styled-components
  • First-class TypeScript types — theme-scale-aware props, replacing @types/styled-system

Install

# npm
npm install @soroush.tech/styled-system
# pnpm
pnpm add @soroush.tech/styled-system
# yarn
yarn add @soroush.tech/styled-system

@emotion/is-prop-valid (^1.4.0, peer) and prop-types (^15.8.1, optional peer) are each used by a single subpathshould-forward-prop and prop-types respectively. Install one only if you import that subpath. You bring your own CSS-in-JS library (Emotion, styled-components, …); the core carries neither at runtime.

Usage

// Example uses Emotion, but styled-system works with most other CSS-in-JS libraries as well
import styled from '@emotion/styled'
import { space, layout, typography, color } from '@soroush.tech/styled-system'

// Add styled-system functions to your component
const Box = styled.div`
  ${space}
  ${layout}
  ${typography}
  ${color}
`

Each style function exposes its own set of component props that handle styles based on values defined in a theme.

// width: 50%
<Box width={1 / 2} />

// font-size: 20px (theme.fontSizes[4])
<Box fontSize={4} />

// margin: 16px (theme.space[2])
<Box m={2} />

// padding: 32px (theme.space[3])
<Box p={3} />

// color
<Box color="tomato" />

// color: #333 (theme.colors.gray[0])
<Box color="gray.0" />

// background-color
<Box bg="tomato" />

Responsive style props

Set responsive width, margin, padding, font-size, and other properties with a shorthand array syntax. See Responsive Styles.

// responsive width
<Box width={[1, 1 / 2, 1 / 4]} />

// responsive font-size
<Box fontSize={[2, 3, 4]} />

// responsive margin
<Box m={[1, 2, 3]} />

// responsive padding
<Box p={[1, 2, 3]} />

Subpath imports

Subpaths mirror the original @styled-system/* packages:

import { css } from '@soroush.tech/styled-system/css'
import { themeGet } from '@soroush.tech/styled-system/theme-get'
import { pick, omit } from '@soroush.tech/styled-system/props'
import propTypes, { createPropTypes } from '@soroush.tech/styled-system/prop-types'
import shouldForwardProp, {
  createShouldForwardProp,
  props,
} from '@soroush.tech/styled-system/should-forward-prop'

Drop-in via alias

Existing styled-system users can swap with a package-manager alias — no code changes:

"dependencies": {
  "styled-system": "npm:@soroush.tech/styled-system@^5"
}

The satellite @styled-system/* packages don't need separate aliases — import them as subpaths off the aliased styled-system name, and they resolve through this package's exports:

import themeGet from 'styled-system/theme-get'
import propTypes from 'styled-system/prop-types'
import { css } from 'styled-system/css'
import shouldForwardProp from 'styled-system/should-forward-prop'

Types resolve under both modern module resolution (node16/nodenext/bundler, via exports) and classic node (via typesVersions).

Documentation

Full docs live in docs/:

Runnable demos live in the examples repo.

Release notes

Per-version notes for every published release live in release-notes/.

License

MIT — a rewrite of styled-system (© 2017–2021 Brent Jackson), see LICENSE.