We establish a Harder–Narasimhan formalism for modifications of $G$-bundles on the Fargues–Fontaine curve. The semi-stable stratum of the associated stratification of the ${B^+_{{\rm dR}}}$-Grassmannian coincides with the variant of the weakly admissible locus defined by Viehmann, and its classical points agree with those of the basic Newton stratum. When restricted to minuscule affine Schubert cells, the stratification corresponds to the Harder–Narasimhan stratification of Dat, Orlik and Rapoport. We also study basic geometric properties of the strata, and the relation to the Hodge–Newton decomposition.