menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

styled-components

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

Channels
Team
Posts
Chat
Members
Info
down-caret

GlobalStyle is it possible to extend when importing?

is it possible to import a GlobalStyle from another library which has been created using createGlobalStyle and extend with some more styles? cont { GlobalStyle } from "another-library"; const ExtendGlobal = styled(GlobalStyle)select { background-color: #f60; }

message-simple
0

Random Question about GlobalStyle

is it possible to import a GlobalStyle from another library which has been created using createGlobalStyle and extend with some more styles? cont { GlobalStyle } from "another-library"; const ExtendGlobal = styled(GlobalStyle)select { background-color: #f60; }

message-simple
0

Performance issues with styled components

When doing some React profiling on my Chrome DevTools, I see some styled components taking up to 100ms to run. This is so weird, since they don't have complex code at all. Here you can see a codesandbox with the component Spinner, which is actually running on our app and it…

message-simple
2

How to type props in functional notation

How to type props in functional notation styled

message-simple
1

We are looking for a Frontend Developer VueJS with German

Incentage AG, based in Fehraltorf 🇨🇭 is looking for a Frontend Entwickler VueJS / Quasar, 80 - 100% (you have to speak German) Tech stack: Frontend, Angular, Backend, Bootstrap, CSS, Confluence, Docker 100’000 - 125’000 CHF / year …

message-simple
0

How can I stop styled-components from passing some props to the DOM?

I am using styled-system to add some responsiveness props like this to my styled components: display={{ xs: "none", sm: "block" }} But styled components passes the display prop to the DOM, so the rendered component has this attribute: …

message-simple
5

Next release when?

Hi, I'm using a tool where the version of styled-components is locked on v5.1.1 since after that the SSR broke (#3374), but for our use-case with their tool we render components in an iframe and the issue with that only got fixed in 5.2+ (style tag renders in the parent…

message-simple
0

Styled-components break react controlled forms using hooks

I built a functional hooks component and used styled-components instead of a styles.css file. However every time I did a key press in an input field, focus was lost. After much investigation, I discovered that by reverting back to the styles.css file and abandoning…

message-simple
2

Creating Dynamic Component for more than one SVG

I have multiple SVG Component files created with SVGR I would like to define them using similar CSS codes. Can I use this in the form of <Icon({SvgRectangle}) /> or <Icon({SvgCircle}) /> etc..

message-simple
0

Is there an equivalent to styledComponentId that returns the dynamic class?

I'd like to get a reference to this in my react component so I can target each instance of the same styled component.

message-simple
0