We study Diophantine approximation in completions of functions fields over finite fields, and in particular in fields of formal Laurent series over finite fields. We introduce a Lagrange spectrum for the approximation by orbits of quadratic irrationals under the modular group. We give nonarchimedean analogs of various well known results in the real case: the closedness and boundedness of the Lagrange spectrum, the existence of a Hall ray, as well as computations of various Hurwitz constants. We use geometric methods of group actions on Bruhat-Tits trees.