Let $X$ be the disjoint union of a family $(X_i)_{i\in I}$ of topological spaces. Simply put, how do you show the universal property of the disjoint union, so that given continuous maps $f_i : X_i \to Y$, there exists precisely one map $f: X \to Y$ such that the set of diagrams
commute, where $\phi_i$ denotes the canonical injection from $X_i$ into $X$?

Let $(X_i)_{i\in I}$ be a family of topological spaces and $X:=\sqcup_{i\in I}X_I=\cup_{i\in I}(X_i\times\{i\})$ be their disjoint union. For each $i\in I$ we have the injection $\phi_i:X_i\to X$ given by $\phi_i(x)=(x,i)$. The topology on $X$ is given by $$ \{ U \subseteq X \mid \phi_i^{-1}(U)\ \text{is open in $X_i$ for every $i\in I$}\}. $$ Clearly this makes each $\phi_i$ a continuous function. Let $Y$ be a topological space and $(f_i)_{i\in I}$, with $f_i:X_i\to Y$ for each $i\in I$, be a family of continuous functions. We wish to show that there is a unique continuous function $f:X\to Y$ such that $f_i=f\circ \phi_i$ for every $i\in I$.
In order for a function $f:X\to Y$ to satisfy $f_i=f\circ\phi_i$, we must have $f(x,i)=f(\phi_i(x))=f_i(x)$ for every $(x,i)\in X$. There is only one function that does this, so it remains to show that the function $f:X\to Y$ defined by $f(x,i)=f_i(x)$ is continuous. Suppose $U$ is an open subset of $Y$. To conclude that $f^{-1}(U)$ is open in $X$, we must show that $\phi_i^{-1}(f^{-1}(U))$ is open in $X_i$ for each $i\in I$. Fixing $i\in I$, we have $$ \phi_i^{-1}(f^{-1}(U)) = (f\circ\phi_i)^{-1}(U) = f_i^{-1}(U), $$ which is open because $f_i$ was assumed to be continuous. This completes the proof.