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 Apr 20, 2024 via pnpm

styled-jsx 5.1.2

Full CSS support for JSX without compromises
Package summary
Share
1
issue
1
moderate severity
meta
1
1
license
5
MIT
Package created
5 Dec 2016
Version published
25 Jan 2023
Maintainers
3
Total deps
5
Direct deps
2
License
MIT

Issues

1

1 moderate severity issue

moderate
via: client-only@0.0.1
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
5 Packages, Including:
client-only@0.0.1
js-tokens@4.0.0
loose-envify@1.4.0
react@18.2.0
styled-jsx@5.1.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

2
All Dependencies CSV
β“˜ This is a list of styled-jsx 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
client-only0.0.1481 BMIT
prod
1
react18.2.079.25 kBMIT
prod peer

Visualizations

Frequently Asked Questions

What does styled-jsx do?

Styled-jsx is a lightweight library developed by Vercel providing complete foolproof CSS support for your JSX files (React components). It enables isolated component-friendly CSS support for both server-rendered and client-rendered applications. The library ensures complete CSS isolation by applying unique classnames to your styles. It leverages the CSSOM APIs for a blazing fast CSS rules injection system and fully supports CSS source maps. Additionally, you get automatic vendor prefixing and dynamic styles and themes support with Styled-jsx, keeping your codebase future-proof. The runtime size of Styled-jsx is only 3kb, making it a preference for performance-sensitive applications.

How do you use styled-jsx?

To use styled-jsx, first, install it via npm by running npm install --save styled-jsx from your terminal. After installing the package, add styled-jsx/babel to plugins in your babel configuration:

{
  "plugins": ["styled-jsx/babel"]
}

Styled-jsx allows you to write isolated CSS code inside your components using <style jsx> tags. For instance:

export default () => (
  <div>
    <p>only this paragraph will get the style :)</p>

    <style jsx>{`
      p {
        color: red;
      }
    `}</style>
  </div>
)

In the above example, the p tag inside the div will get the style specified in <style jsx>.

Where are the styled-jsx docs?

Complete styled-jsx documentation and usage is available in the GitHub repo at https://github.com/vercel/styled-jsx. This documentation includes getting started instructions, configuration options, features, usage details, and more.