Socket
Socket
Sign inDemoInstall

babel-plugin-styled-wind

Package Overview
Dependencies
4
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-styled-wind

Reduce build size and enable simple migration from styled-components with additional babel config


Version published
Weekly downloads
4
Maintainers
1
Install size
1.58 MB
Created
Weekly downloads
 

Readme

Source

babel-plugin-styled-wind

This plugin is a highly recommended supplement to the base styled-wind library, offering some useful features:

  • Use tailwind classnames in styled-components without using any additional dependencies
  • Supports all features of styled-wind, but with no additional bundle size
  • It works independently and doesnt require installing styled-wind

Note: For testing/playing around the tool, use the actual library. Use the babel-pligin-styled-wind only for production to avoid unnecssary configurations. If you are using create-react-app, you should eject before using it.

Quick start

Install the plugin first:

npm install --save-dev babel-plugin-styled-wind

or 

yarn add -D babel-plugin-styled-wind

Then add it to your babel configuration:

{
  "plugins": ["babel-plugin-styled-wind"]
}

Custom themeing

The configurations works very similar to tailwindcss with few exceptions. Details about configuring or extending the default theme object can be found here

  • Create a file styled-wind.js in the root of your project and add custom styles in it. A sample implementation:
// styled-wind.js
module.exports = {
    theme: {
        extend: {
            colors: {
                cyan: '#9cdbff'
            },
        }
    }
}

Documentation

More detailed documentation for styled-wind lives on the styled-wind website!

License

Licensed under the MIT License, Copyright © 2020-present Vilva Athiban and Ameer Jhan.

See LICENSE.md for more information.

Keywords

FAQs

Last updated on 13 Nov 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc