Children Prop in React
From the React Components & JSX cheat sheet · Component Essentials · verified Jul 2026
Children Prop
Pass JSX content between component tags
javascript
// Component with children
function Card({ children, title }) {
return (
<div className="card">
<h2>{title}</h2>
<div className="content">
{children}
</div>
</div>
)
}
// Pass content as children
function App() {
return (
<Card title="User Info">
<p>Name: John Doe</p>
<p>Email: john@example.com</p>
<button>Edit</button>
</Card>
)
}🟢 Essential - Children enables component composition
💡 Anything between tags becomes children prop
📌 Can be text, elements, or other components
propschildrencomposition