\documentclass{beamer}
\usefonttheme{serif}
\beamertemplatenavigationsymbolsempty

\usepackage{xcoffins}
\usepackage{abspos}
\usepackage{ragged2e}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{newfile}

\newoutputstream{io}

\ExplSyntaxOn

\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx }

\NewDocumentCommand \ExampleFrame { m +v } {

    \tl_set:Nn \l_tmpa_tl {#2}
    \tl_replace_all:Nxx \l_tmpa_tl { \iow_char:N \^^M } { \iow_char:N \^^J }
    \regex_replace_once:nnN { ^\v* } { } \l_tmpa_tl

    \openoutputfile{demo#1.tex}{io}
    \addtostream{io}{\l_tmpa_tl}
    \closeoutputstream{io}

    \frame{\input{demo#1}}

}

\ExplSyntaxOff

\begin{document}

\ExampleFrame{1}{
% In preamble:
% \usepackage{tikz}
\absput{\tikz{
    \draw[line width=8pt, lightgray] circle[radius=3.25];
}}
\absput[angle=10, scale=5]{Hello!}
\absput[pg-b, y=.5cm]{\thepage}
}

\ExampleFrame{2}{
% In preamble:
% \usepackage{ragged2e}
% \usepackage{lipsum}
\absput[width=8cm]{
    \justifying
    \lipsum[1][1-5] % Example text
}
}

\ExampleFrame{3}{
\absposset{scale=5}
\absput{Scaled!}
}

\begin{frame}
\NewCoffin \MyCoffin
\SetHorizontalCoffin \MyCoffin {My Coffin}
\absputcoffin[scale=2] \MyCoffin
\end{frame}

\end{document}
