Props
ELI5 — The Vibe Check
Props are how you pass information INTO a component, like giving a coffee machine its settings. You tell the component 'hey, be blue and say Hello' and it uses those values. Props only flow downward — from parent to child.
Real Talk
Props (short for properties) are read-only inputs passed from a parent component to a child component. They allow components to be configurable and reusable. In React, props are plain objects; in Vue, they're declared with defineProps(). Components should never mutate their own props.
Show Me The Code
// React
function Badge({ label, color }) {
return <span style={{ color }}>{label}</span>;
}
// Usage
<Badge label="Admin" color="red" />
When You'll Hear This
"Pass the user's name as a prop to the Avatar component." / "Don't mutate props — emit an event instead."
Related Terms
Binding
Binding is connecting your data to your HTML so they stay in sync.
Component
A component is a self-contained LEGO brick for your UI.
Slot
A slot is a placeholder in a component where a parent can inject its own custom content.
State
State is a component's memory — data that can change over time and causes the UI to update when it does. Think of a counter: the number is state.
Two-way Binding
Two-way binding means your data and your input field are best friends who always tell each other what changed. Type in the box and the data updates.