The reduced dimensionality of two-dimensional (2D) materials results in characteristic types of magnetically and electronically ordered phases. However, only few methods are available to study this order, in particular in ultrathin insulating antiferromagnets that couple weakly to magnetic and electronic probes. Here, we demonstrate that phase transitions in thin membranes of 2D antiferromagnetic FePS3, MnPS3 and NiPS3 can be probed mechanically via the temperature-dependent resonance frequency and quality factor. The observed relation between mechanical motion and antiferromagnetic order is shown to be mediated by the specific heat and reveals a strong dependence of the Néel temperature of FePS3 on electrostatically induced strain. The methodology is not restricted to magnetic order, as we demonstrate by probing an electronic charge-density-wave phase in 2H-TaS2. It thus offers the potential to characterize phase transitions in a wide variety of materials, including those that are antiferromagnetic, insulating or so thin that conventional bulk characterization methods become unsuitable.