  We consider statistical inference in the density estimation model using a
tree-based Bayesian approach, with Optional P\'olya trees as prior
distribution. We derive near-optimal convergence rates for corresponding
posterior distributions with respect to the supremum norm. For broad classes of
H\"older-smooth densities, we show that the method automatically adapts to the
unknown H\"older regularity parameter. We consider the question of uncertainty
quantification by providing mathematical guarantees for credible sets from the
obtained posterior distributions, leading to near-optimal uncertainty
quantification for the density function, as well as related functionals such as
the cumulative distribution function. The results are illustrated through a
brief simulation study.
