# UI Components Basics

> What a UI component is, and why one part is built once and reused. Variants the designer picks, and the states that the user causes.

**Course:** [UI Components](https://learn.benibix.com/learn/design-user-interface)  
**Time:** 10 min

**After this lesson you can:**

- Say what a UI component is
- Tell a variant from a state
- List the five common states

## What a UI component is, and what a state is

A user interface, or UI, is the part of an app you see and touch. It is built from parts called components: a button, a text box, a menu. Each one is made once and reused. A big app may show the same button on 200 screens, and all 200 come from one main part.

That is the point of a component. Change the main one, and every copy changes with it. Make the corners rounder, and 200 buttons get rounder corners at once. Without components, someone has to find and fix every copy by hand, and a few always get missed.

A variant is one version of a part. A button might come in a filled version for the main action and a plain version for the rest. The designer picks the variant when they place the button. It does not change while the app runs.

A state is how a part looks right now, because of what the user is doing. Most parts have five: resting, hover when a mouse is over it, pressed, focused when the keyboard has reached it, and off when it cannot be used. The user causes the state. The designer only draws it.

Every state needs its own look. A pressed button that looks the same as a resting one feels broken, because nothing answered the press. A focused button with no outline leaves keyboard users lost on the page. Drawing only the resting state is the most common gap in a design file.

The off state needs care too. A gray button that cannot be pressed should say why, or the user is stuck guessing. Often it is better to leave the button on and show a clear message when it is pressed too early.

This course stops at the parts themselves. It does not cover research with users, page layout across screen sizes, or building a full design system. Those are subjects of their own. Here you learn what each part is for, and how to pick between the ones that look alike.

![On the left, three versions of a Save button: filled, outline and plain, marked as picked by the designer. On the right, one Save button drawn five times: rest, hover with a thicker edge, pressed and darker, focused with a dashed ring, and off and faded, marked as set by what the user does.](https://learn.benibix.com/diagrams/ui-component-states.svg)

### Example: A bank app changes one button

A bank app shows its main button on 140 screens. The team wants the corners 4 pixels rounder.

Every button is a copy of one main part, so the change takes a few minutes. Before they used components, a change like this took two weeks. It still missed 9 screens.

**Words in this lesson:** [User Interface (UI)](https://learn.benibix.com/term/design/user-interface), [Design Component](https://learn.benibix.com/term/design/design-component), [Component Variant](https://learn.benibix.com/term/design/component-variant), [Component State](https://learn.benibix.com/term/design/component-state)

**Question:** How is a variant of a part different from its state?

**Answer:** The designer picks the variant, and the user causes the state. A variant, such as filled or plain, is chosen when the part is placed. A state, such as hover or pressed, changes while the app runs because of what the user does.

---

Source: https://learn.benibix.com/learn/design-user-interface/ui-components-basics
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.
