I recently tried **\newtcbtheorem** to define new environments, however, these are not overlay-aware. Any idea why this is happening ?
Here is a MWE :
```
\documentclass{beamer}
\usepackage[theorems]{tcolorbox}
\newtcbtheorem[number within=section]{theo_beamer}{Theorem}{colframe=blue}{thm}
\newtcbtheorem[number within=section,use counter from=theo_beamer]{prop_beamer}{Proposition}{colframe=red}{prop}
\resetcounteronoverlays{tcb@cnt@theo_beamer}
\begin{document}
\begin{frame}
\begin{theo_beamer}{Title}{label1}
main result
\end{theo_beamer}
\onslide<2->{
\begin{prop_beamer}{Title}{label2}
Let's call Theorem \ref{label1}
\end{prop_beamer}
}
\end{frame}
\end{document}
```
Top Answer
samcarter
You can make overlay-aware definitions like this:
```
\documentclass{beamer}
\usepackage[theorems]{tcolorbox}
\newtcbtheorem[number within=section]{theo_beamer}{Theorem}{colframe=blue}{thm}
\newtcbtheorem[number within=section,use counter from=theo_beamer]{prop_beamer}{Proposition}{colframe=red}{prop}
\resetcounteronoverlays{tcb@cnt@theo_beamer}
\newenvironment<>{mytheo}[2]{
\begin{actionenv}#3
\begin{theo_beamer}{#1}{#2}
}{
\end{theo_beamer}
\end{actionenv}
}
\newenvironment<>{myprop}[2]{
\begin{actionenv}#3
\begin{prop_beamer}{#1}{#2}
}{
\end{prop_beamer}
\end{actionenv}
}
\begin{document}
\begin{frame}
\begin{mytheo}{Title}{label1}
main result
\end{mytheo}
\begin{myprop}<2->{Title}{label2}
Let's call Theorem \ref{thm:label1}
\end{myprop}
\end{frame}
\end{document}
```
![document2.gif](/image?hash=f91cb61801f27ee19fbfb910ee38807a50edd34ae677ea7e67ca2d0416b88f6a)