[Tex/LaTex] How to add space around tcolorbox theorem

tcolorboxtheorems

In amsthm you can easily change the space before and after a theorem. Can this be done with tcolorbox theorem? If so, how? I haven't been able to find anything in the documentation.

Minimal example:

\documentclass{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}

\newtcbtheorem[number within=section]{mytheo}{My Theorem}
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}

\begin{document}
Add space below this text.

\begin{mytheo}{This is my title}{theoexample}
This is the text of the theorem. The counter is automatically assigned and,
in this example, prefixed with the section number.
\end{mytheo}

Add space above this text.
\end{document}

Best Answer

before skip and after skip provide such spaces. You will not notice them if they are too small.

Sample output

\documentclass{report}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}

\newtcbtheorem[number within=section]{mytheo}{My Theorem}
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries,before
skip=20pt plus 2pt,after skip=20pt plus 2pt}{th}

\begin{document}
Add space below this text.

\begin{mytheo}{This is my title}{theoexample}
This is the text of the theorem. The counter is automatically assigned and,
in this example, prefixed with the section number.
\end{mytheo}

Add space above this text.
\end{document}