The transverse spin transfer from polarized protons to $\Lambda$ and $\bar{\Lambda}$ hyperons is expected to provide sensitivity to the transversity distribution of the nucleon and to the transversely polarized fragmentation functions. We report the first measurement of the transverse spin transfer to $\Lambda$ and $\bar{\Lambda}$ along the polarization direction of the fragmenting quark, $D_\mathrm{TT}$, in transversely polarized proton-proton collisions at $\sqrt{s}=200\,\mathrm{GeV}$ with the STAR detector at RHIC. The data correspond to an integrated luminosity of $18\,\mathrm{pb}^{-1}$ and cover the pseudorapidity range $\left|\eta\right| < 1.2$ and transverse momenta $p_{\mathrm{T}}$ up to $8\,\mathrm{GeV}/c$. The dependence on $p_\mathrm{T}$ and $\eta$ are presented. The $D_\mathrm{TT}$ results are found to be comparable with a model prediction, and are also consistent with zero within uncertainties.