Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

gatsby-plugin-styled-components

Package Overview
Dependencies
Maintainers
7
Versions
399
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

latest
Source
npmnpm
Version
6.16.0
Version published
Weekly downloads
48K
-15.55%
Maintainers
7
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

gatsby

FAQs

Package last updated on 26 Jan 2026

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