Blocks in beamer are one of the interesting features that can be used to highlight ideas, examples and Math content (e.g. Theorems, proofs and corollaries). By default, beamer blocks width is set to the text width of a frame and from that it comes the question How to change the block width in Beamer?

Changing the block width in beamer can be done by modifying the beamer template using the command \addtobeamertemplate{}{}{} where we need to specify the type of the block and modify the textwidth parameter.

Here is an illustrative example of modifying blocks’ width widths to different values

% Set block width in Beamer
\documentclass{beamer}

% Theme choice
\usetheme{CambridgeUS}

% Change standard block width
\addtobeamertemplate{block begin}{%
    \setlength{\textwidth}{0.4\textwidth}
}{}

% Change alert block width
\addtobeamertemplate{block alerted begin}{%
    \setlength{\textwidth}{0.6\textwidth}
}{}

% Change example block width
\addtobeamertemplate{block example begin}{%
    \setlength{\textwidth}{0.8\textwidth}
}{}

\begin{document}

% Frame 1
\begin{frame}{Blocks with a modified width}

    \begin{block}{Standard Block}
        This is a standard block.
    \end{block}  

    \begin{alertblock}{Alert Message}
        This block presents alert message.
    \end{alertblock}
    
    \begin{exampleblock}{An example of typesetting tool}
        Example: MS Word, \LaTeX{}
    \end{exampleblock}
\end{frame}

\end{document}

Compiling this code yields:

change Blocks width beamer

and here is a non modified version where blocks have a width equal to the text width:

Blocks standard width beamer

The above code will change the width of the predefined blocks. The new width is the second mandatory argument of the \setlength command; in this case, it is set to 0.4\textwidth for the standard block, 0.4\textwidth for the alert block and 0.4\textwidth for the example block, resepectively.