Using the dynamic van der Waals theory [Phys. Rev. E 75, 036304 (2007)], we numerically investigate the hydrodynamics of Leidenfrost droplets under gravity in two dimensions. Some recent theoretical predictions and experimental observations are confirmed in our simulations. A Leidenfrost droplet larger than a critical size is shown to be unstable and break up into smaller droplets due to the Rayleigh-Taylor instability of the bottom surface of the droplet. Our simulations demonstrate that an evaporating Leidenfrost droplet changes continuously from a puddle to a circular droplet, with the droplet shape controlled by its size in comparison with a few characteristic length scales. The geometry of the vapor layer under the droplet is found to mainly depend on the droplet size and is nearly independent of the substrate temperature, as reported in a recent experimental study [Phys. Rev. Lett. 109, 074301 (2012)]. Finally, our simulations demonstrate that a Leidenfrost droplet smaller than a characteristic size takes off from the hot substrate because the levitating force due to evaporation can no longer be balanced by the weight of the droplet, as observed in a recent experimental study [Phys. Rev. Lett. 109, 034501 (2012)].