You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
835 B
835 B
id | title | permalink | layout | category |
---|---|---|---|---|
faq-styling | Styling and CSS | docs/faq-styling.html | docs | FAQ |
How do I add CSS classes to components?
Pass a string as the className
prop:
render() {
return <span className="menu navigation-menu">Menu</span>
}
Can I use inline styles?
Yes, see https://reactjs.org/docs/dom-elements.html#style
Are inline styles bad?
CSS classes are generally more efficient than inline styles.
What is CSS-in-JS?
CSS-in-JS refers to a pattern where CSS is written with Javascript, then extracted into a stylesheet.
Comparison of CSS-in-JS Libraries
Can I do animations in React?
React can be used to power animations. See React Transition Group, for example.