Let an electric current $I$ flow around a closed loop $C$.
[We will be primarily interested in the magnetic moments, not on the magnetic field that they create.]
$$ \bm{\mu}=\frac{I}{2} \oint_C \mathbf{r}\times d\mathbf{s} $$
[The dipole moment is a source of a magnetic field.]
If we assume one electron (charge $e$, mass $m_e$) orbiting around a loop $C$, then
$$ \bm{\mu} = \gamma \mathbf{L}, $$
where
Electrons also have spin (internal angular momentum). Therefore, there is an additional magnetic moment due to the electron spin (in this case, $g_e=2$).
Fixed length vector.
An electron is orbiting around the atom in a fixed orbit (due to quantization) and this results in a vector $\bm{\mu}$ of fixed length.
[We will be primarily interested in the magnetic moments. Not in the magnetic field that they create.]
Assume a field $u = u(x)$ defined in the real space, $x \in \mathbb{R}$, and taking values on the unit sphere, $u \in \mathbb{S}^2$. Such a field is realised by a vector $\mathbf{u} \in \mathbb{R}^3$ with unit length $|\mathbf{u}| = 1$.