Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 21, 2024 via pnpm

styled-components 6.0.1

CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.
Package summary
Share
2
issues
1
high severity
license
1
1
low severity
license
1
7
licenses
207
MIT
16
ISC
2
BSD-2-Clause
4
other licenses
Apache-2.0
1
CC-BY-4.0
1
BSD-3-Clause
1
0BSD
1
Package created
16 Aug 2016
Version published
28 Jun 2023
Maintainers
4
Total deps
229
Direct deps
21
License
MIT

Issues

2

1 high severity issue

high
Recommendation: Read and validate the license terms
via: @babel/cli@7.24.5 & others
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: @babel/cli@7.24.5 & others
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
207 Packages, Including:
@babel/cli@7.24.5
@babel/code-frame@7.24.2
@babel/compat-data@7.24.4
@babel/core@7.24.5
@babel/generator@7.24.5
@babel/helper-annotate-as-pure@7.22.5
@babel/helper-builder-binary-assignment-operator-visitor@7.22.15
@babel/helper-compilation-targets@7.23.6
@babel/helper-create-class-features-plugin@7.24.5
@babel/helper-create-regexp-features-plugin@7.22.15
@babel/helper-define-polyfill-provider@0.6.2
@babel/helper-environment-visitor@7.22.20
@babel/helper-function-name@7.23.0
@babel/helper-hoist-variables@7.22.5
@babel/helper-member-expression-to-functions@7.24.5
@babel/helper-module-imports@7.24.3
@babel/helper-module-transforms@7.24.5
@babel/helper-optimise-call-expression@7.22.5
@babel/helper-plugin-utils@7.24.5
@babel/helper-remap-async-to-generator@7.22.20
@babel/helper-replace-supers@7.24.1
@babel/helper-simple-access@7.24.5
@babel/helper-skip-transparent-expression-wrappers@7.22.5
@babel/helper-split-export-declaration@7.24.5
@babel/helper-string-parser@7.24.1
@babel/helper-validator-identifier@7.24.5
@babel/helper-validator-option@7.23.5
@babel/helper-wrap-function@7.24.5
@babel/helpers@7.24.5
@babel/highlight@7.24.5
@babel/parser@7.24.5
@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.5
@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1
@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1
@babel/plugin-external-helpers@7.24.1
@babel/plugin-proposal-class-properties@7.18.6
@babel/plugin-proposal-object-rest-spread@7.20.7
@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2
@babel/plugin-syntax-async-generators@7.8.4
@babel/plugin-syntax-class-properties@7.12.13
@babel/plugin-syntax-class-static-block@7.14.5
@babel/plugin-syntax-dynamic-import@7.8.3
@babel/plugin-syntax-export-namespace-from@7.8.3
@babel/plugin-syntax-import-assertions@7.24.1
@babel/plugin-syntax-import-attributes@7.24.1
@babel/plugin-syntax-import-meta@7.10.4
@babel/plugin-syntax-json-strings@7.8.3
@babel/plugin-syntax-jsx@7.24.1
@babel/plugin-syntax-logical-assignment-operators@7.10.4

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
16 Packages, Including:
anymatch@3.1.3
css-color-keywords@1.0.0
electron-to-chromium@1.4.776
fs.realpath@1.0.0
glob-parent@5.1.2
glob@7.2.3
inflight@1.0.6
inherits@2.0.4
lru-cache@5.1.1
minimatch@3.1.2
once@1.4.0
picocolors@1.0.1
semver@5.7.2
semver@6.3.1
wrappy@1.0.2
yallist@3.1.1

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
esutils@2.0.3
regjsparser@0.9.1

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
@ampproject/remapping@2.3.0

Creative Commons Attribution 4.0 International

Uncategorized
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
caniuse-lite@1.0.30001620

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map-js@1.2.0

BSD Zero Clause License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
include-copyright
include-license
include-original
Cannot
hold-liable
Must
1 Packages, Including:
tslib@2.6.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

21
All Dependencies CSV
β“˜ This is a list of styled-components 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@babel/cli7.24.5179.8 kBMIT
prod
1
1
@babel/core7.24.5763.27 kBMIT
prod peer
1
1
@babel/helper-module-imports7.24.362.3 kBMIT
prod
@babel/plugin-external-helpers7.24.16.41 kBMIT
prod
1
1
@babel/plugin-proposal-class-properties7.18.61.64 kBMIT
prod
1
1
@babel/plugin-proposal-object-rest-spread7.20.716.49 kBMIT
prod
1
1
@babel/preset-env7.24.5229.71 kBMIT
prod
1
1
@babel/preset-react7.24.111.93 kBMIT
prod
1
1
@babel/preset-typescript7.24.120.98 kBMIT
prod
1
1
@babel/traverse7.24.5603.67 kBMIT
prod
@emotion/is-prop-valid1.2.228.5 kBMIT
prod
@emotion/unitless0.8.12.17 kBMIT
prod
@types/stylis4.2.66.88 kBMIT
prod
css-to-react-native3.2.018.86 kBMIT
prod
csstype3.1.3180.02 kBMIT
prod
postcss8.4.38193.21 kBMIT
prod
react-dom18.3.14.3 MBMIT
prod peer
react18.3.1310.65 kBMIT
prod peer
shallowequal1.1.02.99 kBMIT
prod
stylis4.3.2135.9 kBMIT
prod
tslib2.6.215.59 kB0BSD
prod

Visualizations

Frequently Asked Questions

What does styled-components do?

Styled-components is a library for styling React applications. It combines the best of ES6 and CSS to create visual primitives that help developers structure their apps without stress. It utilizes tagged template literals (a recent addition to JavaScript) and the power of CSS, allowing the writing of actual CSS code to style your components. Styled-components removes the mapping between components and styles, promoting the use of components as a low-level styling construct. The library is compatible with both React (for the web) and React Native, making it a perfect choice for universal apps.

How do you use styled-components?

Using styled-components is straightforward. First, you need to install the package using npm: npm install styled-components@^5.0.0 react@^16.8 react-dom@^16.8 react-is@^16.8. Then, you can create styled components using tagged template literals or style objects. Here is a basic example using tagged template literals:

import styled from 'styled-components';

const Button = styled.button`
  color: grey;
`;

And here's how you would do it using style objects:

const Button = styled.button({
  color: 'grey',
});

In your React component, you can then use the newly styled Button like any other React component.

Where are the styled-components docs?

For comprehensive information on using styled-components, refer to the official documentation at styled-components.com/docs. Here you can find everything from getting started guides, API references, to more advanced topics like theming and server-side rendering. The documentation also includes an explanation of tagged template literals. For users wanting to upgrade from v4, instructions are provided in the documentation.