\documentclass{article}
\usepackage{nicefrac,units}
\begin{document}
Text mode, then math mode.

\section{Unit}
Normal: \unit{m} $\unit{m}$

In bold sans-serif:
{\sffamily\bfseries\unit{m} }
{\sffamily\bfseries$\unit{m}$}

In bold sans-serif, with a unit:
{\sffamily\bfseries\unit[1]{m}}
{\sffamily\bfseries$\unit[1]{m}$}

\section{Unitfrac}
Normal: \unitfrac{m}{s} $\unitfrac{m}{s}$

In bold sans-serif:
{\sffamily\bfseries\unitfrac{m}{s}}
{\sffamily\bfseries$\unitfrac{m}{s}$}

In bold sans-serif, with a unit:
{\sffamily\bfseries\unitfrac[1]{m}{s}}
{\sffamily\bfseries$\unitfrac[1]{m}{s}$}

In scriptsize, italic sans-serif:
{\scriptsize\sffamily\itshape\unitfrac[1]{m}{s}}
{\scriptsize\sffamily\itshape$\unitfrac[1]{m}{s}$}


\section{Nicefrac}
Normal: \nicefrac{1}{2} $\nicefrac{1}{2}$

% Note: Can't use \mathtt in textmode
% but \texttt throws us off in math!!!
Typewriter: \nicefrac[\texttt]{1}{2} $\nicefrac[\texttt]{1}{2}$

In bold, italic:
{\bfseries\itshape\nicefrac{1}{2}}
{\bfseries\itshape$\nicefrac{1}{2}$}

Caligraphic $\nicefrac[\mathcal]{A}{B}$

In arXiv examples:
Dose (\unit[10$^{14}$]{ions/cm$^2$)}%

And also handles mathematics
\nicefrac{x+y+z}{3}; $\nicefrac{x+y+z}{3}$

Some, only in math mode
$\nicefrac{x^2+y^2}{x^2-y^2}$

\end{document}