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

#Boolean or String props ?

Which one is the best approach ? <Button color="primary"> Button </Button> or …

thumbsup
0
message-simple
3

Is this approach considered bad practice?

Instead of digging theme out per property like so: could you do this instead?: It makes more complex examples easier to follow, but using the css function in this way feels super gross.

thumbsup
0
message-simple
3

Is there any way to filter props and use the "as" prop?

I have some components that I want to filter the props that are being rendered to the DOM. In some cases I also want to use the "as" prop to change the rendered element. Below is a contrived example. The rendered elements will be <li />'s but the props will be also be rendered…

thumbsup
0
message-simple
3

Is it possible to use more than one theme in a component?

Example of multiple themes: dark, without button, no-border

thumbsup
0
message-simple
0

MUIDataTable

how to override MUIDataTable design in typescript with styled component in react

thumbsup
0
message-simple
0

Pretty new in styled component and I want to design React Bootstrap megamenu

Basically this one https://codepen.io/devpatelwebdeveloper/pen/QWwbogY any idea what should be my approach?

thumbsup
0
message-simple
2

I'm starting a new project. Should I go with version 4 or version 5?

thumbsup
0
message-simple
2

cannot get props value in css prop via babel-plugin

simple test demo: using styled-components v5 console.log is as follow using styled-components v4 console.log is as follow …

thumbsup
0
message-simple
0

Styled Components and Hydration

When using SSR, does styled-components re-render all the styles during component hydration or does it use the existing styles that were already rendered by the server?

thumbsup
0
message-simple
9