Questions tagged [styled-jsx]
50 questions
12
votes
4 answers
Styled-jsx typescript error after migrating to monorepo structure. Property 'jsx' does not exist on type 'DetailedHTMLProps'
I am using styled-jsx in my project and I just migrated it to a monorepo structure, and since then I have been having the following problem:
Type '{ children: string; jsx: true; }' is not assignable to type
…

André Guimarães Aragon
- 1,221
- 1
- 6
- 16
12
votes
6 answers
Warning: Received `true` for a non-boolean attribute `jsx`. Zeit Styled Jsx
I am trying to use styled-jsx with some code. However, no matter what I do, I seem to get an error
index.js:1437 Warning: Received `true` for a non-boolean attribute `jsx`.
If you want to write it to the DOM, pass a string instead: jsx="true" or…

Eric Poretsky
- 121
- 1
- 3
4
votes
0 answers
Styled jsx for React(vite config) + tailwind + postcss
I have a React project and wanted to implement styled-jsx with postcss( eventually it can be sass, just want nesting to work in tag. Also want to add tailwindcss, and be able to use @apply or @screen directives inside style tag. In next.js there is…

Wiktor Kujawa
- 595
- 4
- 21
4
votes
2 answers
Use styled-jsx without ejecting create-react-app
Since I started using NextJS, I've grown quite fond of styled-jsx (I know, not everyone likes it). I'd love to use it in my create react app. Locally it works great. However, react shows me the error:
Warning: Received `true` for a non-boolean…

Xen_mar
- 8,330
- 11
- 51
- 74
4
votes
3 answers
Why won't the JSX CSS be applied?
I'm working off of the documents from the "Learn" section on the Next.js website.
The CSS below does not get applied to the component if using the jsx style tag; however, if I add the CSS as an object literal attribute it gets applied. How can I to…

Pfrex
- 159
- 2
- 13
3
votes
2 answers
Styled-jsx styling not applied to Framer-Motion element
I think I'm loosing my mind.
I created a new Nextjs project, installed Framer-Motion via NPM, ran the project in dev mode. Everything compiles and the page loads, but as soon as I add motion to an element, it vanishes with no errors.
I'm getting…

Kevin Merinsky
- 45
- 6
3
votes
1 answer
Some parts of css renders later after adding flex
I am developing a blog and I recently added a div element with display: flex; to make the elements appear in the same row.
However, after making this change whenever I load the page, the elements shift a bit to the right and the font loads up a bit…

Amita
- 944
- 1
- 8
- 20
3
votes
0 answers
PostCSS syntax highlighting in styled-jsx does not work in VSCode
PostCSS syntax highlighting is not enabled within React's styled jsx when using VSCode.