APIs

style prop

Accepts a CSS property object rather than an HTML style string. Most ordinary property names use camelCase; numeric length values generally become pixels except unitless properties.

Formal Syntax & Structure

react syntaxreact
style prop

Working Example

Example Snippetreact
<p style={{ padding: 8, fontWeight: "bold" }}>Ready</p>
React Reference