menu

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# Help
view-forward
# jest
view-forward
# Off Topic
view-forward
# Website
view-forward
Team
Posts
Members
Info

Avoiding Repeated Use of ${props => props.theme.*};

I'm finding that accessing a theme across a component causes a lot of noise in the code: Is there a way to simplify things to something like:

thumbsup
0
message-simple
55

How to use style array of int added by styled hoc?

Hello, we are using styled hoc to style a Link component, the HOC add a props.style = [11], we don't know what to do with that props to append the style for our react native web component, any idea how we can generate the classname from that array of style id?

thumbsup
0
message-simple
0
Deleted·14d# General

Using named classes inside styled components is considered a bad practice?

Hello everyone, I have been using this approach for a while but haven't thought muic about how styled-components would output this into the browser and if this could lead to any conflict if we use the same classes names classes for different components. I believe that all…

thumbsup
0
message-simple
0

Live Templates in WebStorm

I couldn't find something similiar to VS Code - Styled Components - Snippet for JetBrains WebStorm, quickly. So, I wanted to ask if someone has or know where I can find Live Templates for Styled Components? If not, I will create and share it. …

thumbsup
0
message-simple
2

[ROADMAP QUESTION] CSS output on compile

Hi there is any plan to allows SC to be compiled as **.css in build?

thumbsup
0
message-simple
0

Disable injection or specify target DOM element

Question here, hopefully simple. How does one disable implicit head styles injection or specifies target DOM element where critical styles should be injected? Reason why I need it: I'm working on serverless hot swappable ui runtime and I cannot afford side-effects like these…

thumbsup
1
message-simple
1

Issues with Typescript

i'm having issues with styled components and typescript. i have a code sandbox here with all the stuff installed: https://codesandbox.io/s/gallant-meadow-yo25j?file=/src/App.tsx on the react-bootstrap API it has a prop called body, as documented here:…

thumbsup
0
message-simple
0

Trying out a bugfix on styled-components - building/linking

Hi, I found a bug where theme styles do not render on static Gatsby pages, and I decided to fork styled-components because I found a fix. Now I need to use my forked (fixed) version in my Gatsby site, so I npm linked it in hopes of pulling the fixed version of styled-components…

thumbsup
0
message-simple
0

We have a new Discord server

I've created a new Server for Styled Components here https://discord.gg/hfGUrbrxaU

thumbsup
0
message-simple
0

Performance during hydration

I have a gatsby site that uses Styled Components. During page load, hydration takes a long time. I can see many, many calls to generateAndInjectStyles in the flame chart in dev tools. Is this expected? The styles are already present in the page (from SSR). I would expect that…

thumbsup
1
message-simple
1