menu
announcement

Spectrum will become read-only on August 10, 2021. 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

While deploying my Next Js project on vercel.com, I get the types…

I don't know what to do, can you help me? Package.json

thumbsup
0
message-simple
1

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: …

thumbsup
0
message-simple
5

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.

thumbsup
0
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…

thumbsup
0
message-simple
2

Any chance to look at my question?

https://stackoverflow.com/questions/68364093/styled-components-extends-props Thnx

thumbsup
1
message-simple
1

How to automatically add className to all the styled-components?

Hi! I'm looking for a way to automatically add className to all the styled components (e.q. const MyButton = styled.button `` should then have <button class="MyButton" ... ). since we're creating components which are then used also in other projects and we want to enable for…

thumbsup
0
message-simple
0

Hello everyone, how can i configure styled component for Flow js

I can't seem to read theme from props ex: const Container = styled.Viewwidth: ${(props) => props.theme.} //This does not auto complete;

thumbsup
0
message-simple
0

Next.js / styled components - @media breakpoint - change image content

Hi! I have following piece of code, which runs in dev mode (npm run dev), but bugs out, when published live (npm run build + export [nextjs static site]): [code] import styled from "styled-components"; …

thumbsup
0
message-simple
0

How to use styled-components in a hybrid SSR and SSG

Hi, The styled-components docu outlines that if you want to use styled-components for SSR, you need to include ServerStyleSheet in a getInitialProps function in the custom Document file. To use getInitialProps will similar to getServerSideProps trigger the page to be SSR. But…

thumbsup
0
message-simple
0

[TypeScript] How to extract the prop types of a CSS util/mixin?

Looking for a way to get the prop types not of a component but a CSS util, e.g.: And then the component that uses it (PropType is the thing I'm looking for. React.Component<...> doesn't work here because Mixin is not a component, and TypeScript's native Parameters<...> doesn't…

thumbsup
0
message-simple
1