Atlas
  • All-in-one
  • Solutions
  • Compare
  • Pricing
PricingGet started
All guides
July 9, 2026·10 min read·UML, component diagram, architecture, modeling

UML Component Diagrams: A Complete Guide

Component diagrams show how a system decomposes into replaceable parts and the interfaces they expose and consume. This guide covers components, ball-and-socket interfaces, ports, and dependencies.

As a system grows past the point where a class diagram can hold it, you need a higher-altitude view: not individual classes but the major building blocks and how they plug together. That is what a component diagram provides. It models a system as a set of components, each a replaceable unit with well-defined interfaces, and shows how they depend on one another. For architecture reviews, service decomposition, and explaining a system to a new team, it is the right level of abstraction.

The signature notation of the component diagram is the ball-and-socket connector, which makes provided and required interfaces visible at a glance. This guide covers components, those interfaces, ports, and how component diagrams relate to the deployment and class diagrams they sit between. You can draw them at /diagrams, and the wider UML context is at /diagram-tools/uml-diagram.

What counts as a component

A component is a modular, replaceable part of a system that encapsulates its contents and exposes its behavior through interfaces. It is drawn as a rectangle with the component stereotype (the word component in guillemets, or a small component icon in the corner). Examples are an Authentication Service, an Order Processing module, a Payment Gateway adapter, or a database access layer. The defining property is replaceability: you should be able to swap a component for another that offers the same interfaces without the rest of the system noticing.

This is a design-time abstraction, not necessarily a physical file or process. A component might be a microservice, a library, a subsystem, or a logical grouping of classes. The point of drawing it as a component is to declare a boundary and a contract: here is a unit, here is what it offers, here is what it needs. That contract is what lets teams work against each other's components in parallel.

Provided and required interfaces

The most distinctive notation in a component diagram is the ball-and-socket symbol. A provided interface, the services a component offers to others, is drawn as a small circle (the ball, sometimes called a lollipop) on a stick from the component. A required interface, the services a component needs from others, is drawn as a half-circle (the socket) on a stick. When one component's ball fits into another's socket, they are connected: the provider satisfies the consumer's requirement.

This notation is powerful because it makes dependencies explicit and directional. You can see immediately that the Order component requires a Payment interface, and that the Payment Gateway component provides it, so the two connect. Reading a well-drawn component diagram, you can trace exactly what each part depends on, which is precisely the information you need when planning a change, isolating a fault, or deciding what to mock in a test.

Ports and internal structure

A port, drawn as a small square on the boundary of a component, is a named interaction point that groups interfaces together. Ports let you distinguish, for instance, a component's public API port from its admin port, each bundling its own provided and required interfaces. For complex components, ports keep the connections organized rather than having a dozen bare interfaces sprouting from every edge.

You can also show a component's internal structure by nesting the smaller components or classes that realize it inside its rectangle, with connectors wiring their interfaces to the outer component's ports. This is useful when explaining how a subsystem is built, but it is easy to overdo. Most component diagrams are more valuable as black-box views that show the pieces and their contracts, leaving the internals to lower-level diagrams.

How it relates to other diagrams

Component diagrams sit between class diagrams below and deployment diagrams above. Class diagrams describe the internals of what realizes a component; deployment diagrams describe where components physically run. Knowing which to reach for saves a lot of confusion.

  • Use a class diagram when you care about individual classes, their attributes, and their relationships.
  • Use a component diagram when you care about major building blocks and the interfaces between them.
  • Use a deployment diagram when you care about which physical nodes or servers host which artifacts.
  • Component diagrams answer "what are the parts and how do they connect"; deployment diagrams answer "where does each part run".
  • A single component often maps to many classes and is later deployed as one or more artifacts.
  • For microservice architectures, a component diagram is frequently the clearest single overview of the system.

Keep reading

  • Best Diagramming Software in 2026: The Overall Buyer Guide
  • How to Make Diagrams for Confluence
  • How to Make Diagrams for Notion
  • Free PDF tools
  • The all-in-one work OS

FAQ

Questions, answered.

What is a component in UML?
A component is a modular, replaceable part of a system that encapsulates its contents and exposes behavior through well-defined interfaces. It can be a microservice, library, or subsystem. Its defining property is that it can be swapped for another offering the same interfaces.
What is the ball-and-socket notation?
It shows interfaces between components. A provided interface (the ball or lollipop, a circle on a stick) is a service a component offers. A required interface (the socket, a half-circle) is a service it needs. When a ball fits a socket, the provider satisfies the consumer.
What is the difference between a component diagram and a deployment diagram?
A component diagram shows the logical building blocks of a system and the interfaces between them. A deployment diagram shows the physical topology: which artifacts run on which hardware nodes or servers. Components answer what the parts are; deployment answers where they run.
What is a port in a component diagram?
A port is a named interaction point on a component boundary, drawn as a small square, that groups related interfaces together. Ports let you distinguish, for example, a public API port from an admin port, each with its own provided and required interfaces.
Are component diagrams good for microservices?
Yes. A component diagram is often the clearest single overview of a microservice architecture, because each service maps naturally to a component and the ball-and-socket notation makes the dependencies between services explicit.

Ready when you are

One workspace, not ten.

Atlas replaces the stack with one platform for tasks, projects, CRM, contracts, e-signature, PDF tools, and analytics. Start free.

Get started freeSee pricing
AtlasWork, planned itself.

The AI-native, all-in-one work platform. Tasks, projects, CRM, contracts, and analytics in one calm workspace.

All systems operational
  • SOC 2 II
  • ISO 27001
  • HIPAA
  • GDPR

Product

  • Overview
  • PDF tools
  • People & HR
  • Integrations
  • Marketplace
  • Pricing

Resources

  • Guides
  • Docs
  • API reference
  • Support
  • Changelog
  • Status

Company

  • About
  • Careers
  • Press
  • Contact

Legal & trust

  • Trust center
  • Security
  • Privacy
  • Terms
  • DPA
  • GDPR
  • SLA
  • Refunds
Atlas, a product by wrxstack.com·© 2026 wrxstack·All rights reserved
PrivacyTermsSecurityStatus