# UI Component

> A small part of a page, like a button or card. You can use it again.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** Component, Front-End Component, React Component

## Think of it like

Think of it like a toy brick. You snap small bricks together to build a whole castle.

## Definition

A component is a small piece of a user interface that you can use again. A button, a card or a menu can each be one. Each one holds its own look, its own data and what it does. You build a page by putting components inside other components. The same component can be used in many places with different inputs. Most new front-end frameworks are built around them.

## Example

Emma makes a ProductCard component once. Her shop page shows 40 of them, each with a different name and price.

## Example code

```jsx
function Greeting({ name }) {
  return <p>Hi {name}</p>;
}
```

A tiny component that says hi to the name it is given.

## Why it matters

Components let you build once and reuse. A fix in one place fixes every copy.

## Common mistake

Making one huge component that does everything. Split it into small parts that each do one job.

## Three principles

- **Small and reusable.** Build once, use many times.
- **Holds its own parts.** Look, data and behaviour.
- **Nests inside others.** Pages are built from them.

## Related terms

- [Props](https://learn.benibix.com/term/development/props)
- [UI State](https://learn.benibix.com/term/development/state)
- [React](https://learn.benibix.com/term/development/react)
- [Front End](https://learn.benibix.com/term/development/front-end)

---

Source: https://learn.benibix.com/term/development/component
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
