From https://github.com/lvjr/tabularray/issues/36
I have added varwidth
library and measure
option to tabularray
package. You can put vertical material inside cells with \UseTblrLibrary{varwidth}
and option measure=vbox
. You can also set measure=vbox
as default option.
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{varwidth}
\begin{document}
\begin{tblr}{
colspec = {Xl}, hlines, vlines,
measure = vbox,
}
text & text \\
\begin{itemize}
\item text 1
\item text 2
\end{itemize} & text 3 \\
\end{tblr}
% set "measure=vbox" as default
\SetTblrInner{measure=vbox}
\begin{tblr}{
colspec = {Xl}, hlines, vlines,
}
text & text \\
\begin{itemize}
\item text 1
\item text 2
\end{itemize} & text 3 \\
\end{tblr}
\end{document}

You may download the latest package file from
https://github.com/lvjr/tabularray/raw/main/tabularray.sty
or wait for version 2021N
scheduled on September 1st. I need to update the manual before next release.
But it is better to use @egreg's solution, because there is extra vertical space around itemized cells (the same is true for tabular
and tabularx
environments).