Socket
Socket
Sign inDemoInstall

gatsby-plugin-styled-components

Package Overview
Dependencies
Maintainers
6
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-styled-components

Gatsby plugin to add support for styled components


Version published
Weekly downloads
57K
decreased by-6.05%
Maintainers
6
Weekly downloads
 
Created
Source

gatsby-plugin-styled-components

A Gatsby plugin for styled-components with built-in server-side rendering support.

Install

npm install gatsby-plugin-styled-components styled-components babel-plugin-styled-components

How to use

Edit gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-styled-components`,
      options: {
        // Add any options here
      },
    },
  ],
}

Options

You can pass options to the plugin, see the Styled Components docs for a full list of options.

For example, to disable the displayName option:

options: {
  displayName: false
}

Note: The ssr option will be ignored. Gatsby will apply it automatically when needed.

Disabling vendor prefixing

If you don't require vendor prefixes for adding legacy CSS properties then this can be disabled by supplying the disableVendorPrefixes option:

options: {
  disableVendorPrefixes: true
}

Keywords

FAQs

Package last updated on 23 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc