We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://www.solidjs.com/
https://www.solidjs.com/tutorial/bindings_style
inline-style
unlike react, solidjs uses the default css property name (kebab-case) with "" - "font-size" (react: fontSize)
""
"font-size"
fontSize
<div style={{ color: `rgb(${num()}, 180, ${num()})`, "font-weight": 800, "font-size": `${num()}px`}} > Some Text </div>
styled-components Solid offers an official wrap of styled-components implementation of its own. - solid-styled-components
solid-styled-components
differences from react: styled-compoents are..
styled-compoents
styled.div
styled("div")
import { css } from "solid-styled-components";
import { styled } from "solid-styled-components"; const Btn = styled("button")` border-radius: 4px; `;
styled-jsx (by vercel) unofficial wrapper
https://github.com/solidjs/solid-styled-jsx
function Button() { const [isLoggedIn, login] = createSignal(false); return ( <> <button className="button" onClick={() => login(!isLoggedIn())}> {isLoggedIn() ? "Log Out" : "Log In"} </button> <style jsx dynamic> {` .button { background-color: ${isLoggedIn() ? "blue" : "green"}; color: white; padding: 20px; margin: 10px; } `} </style> </> ); }
Lifecycles
Testing
<For>
<Show>
<Switch>/<Match>
<Index>
<ErrorBoundary>
<Suspense>
<Dynamic>
<Protal>
/* @once */
WIP
tsx/jsx https://www.solidjs.com/guides/typescript#configuring-typescript
{ "compilerOptions": { "jsx": "preserve", "jsxImportSource": "solid-js" } }
class
className
classList
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Solid JS frameworks support
Codegen
https://www.solidjs.com/tutorial/bindings_style
Styling
inline-style
unlike react, solidjs uses the default css property name (kebab-case) with
""
-"font-size"
(react:fontSize
)styled-components
Solid offers an official wrap of styled-components implementation of its own. -
solid-styled-components
differences from react:
styled-compoents
are..styled.div
->styled("div")
import { css } from "solid-styled-components";
styled-jsx (by vercel) unofficial wrapper
States & Events
Lifecycles
Testing
Unique Elements
<For>
<Show>
<Switch>/<Match>
<Index>
<ErrorBoundary>
<Suspense>
<Dynamic>
<Protal>
Special Attributes
/* @once */
Runtime & Env / Editor
WIP
tsx/jsx
https://www.solidjs.com/guides/typescript#configuring-typescript
Examples
References
Resources
Note: Differences from react
class
attribute (noclassName
) - to specify multiple, we can useclassList
(not found in react)styled("div")
like sytax (Why not support property access style usage? styled.div instead of styled("div") solidjs/solid-styled-components#28)The text was updated successfully, but these errors were encountered: