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

Issue in having a functional component wrapper on a styled component

I am creating a set of functional components in my code so that anybody can use it without knowing styled components: One problem with exposing this directly is that it doesn't call out which attributes it really needs. So i create a functional component wrapper on top of this…

thumbsup
0
message-simple
2

Accessibility and styled-components

What is the state of the art in affording (and enforcing) accessibility when using styled-components? I haven't seen much since this discussion: https://spectrum.chat/thread/926391be-5cea-4d6a-aee8-a44a0fdc2081 Since it replaces DOM primitives with its own styled versions, SC…

thumbsup
1
message-simple
10

using if/else

below is a pusedo code which I know it is not possible `const styles = css` width: 100%; …

thumbsup
0
message-simple
12

styled-components and jsx-a11y

I’m using VSCode and ESLint config airbnb. ESLint can’t tell what element is being wrapped by styled-components and therefore doesn’t throw error related to jsx-a11y. Is there a workaround to this?

thumbsup
0
message-simple
3

eslint-plugin-jsx-A11y don't work with styled-components

At my company we have decided to go and start using styled-components, we favor and give a lot of relevance to Accessibility, we were using previously eslint-plugin-jsx-a11y before and one of my coworkers brought to my attention that this plugin doesn't really works with…

thumbsup
0
message-simple
1

styles missing in cra production build but not in dev

Hi Thanks for any help in advance. Really appreciate it. I have created a website using chartjs and styled components really for the first time using either and it works fine in development. But when I build the production build using 'npm run build' most of the css is now…

thumbsup
0
message-simple
10

Nested tag template literals

Hello dear developers, here's my problem, hope you can help me out. I have the following component structure: • component.tsx (a react component) …

thumbsup
0
message-simple
9

Design patterns

• Exist some Design pattern for React Components or Styled Components? • What do you think I should do to have good components?

thumbsup
0
message-simple
0

Use CSS Prop with CRA, Typescript & Storybook

Hey styled-components community, I have a project with the following toolchain: • React (with CRA) …

thumbsup
0
message-simple
0

Typescript: Extending a Styled Component and overriding the `as` prop

This question is somewhat related to this If I create a simple Styled Component, it supports the correct props by default, for example: Now I want to extend the Card into a CardLink - which is a clickable Card. …

thumbsup
2
message-simple
4