An hydrogel comprising a colloidal suspension of ?I ??II y?Z two-dimensional nanocrystals In water, wherein MI is Na+ and/or Li+, MII is Mg2+ or a mixture of Mg2+ with one or more Ni2+, Zn2+, Cu2+, Fe2+ and/or Mn2+, P is a mixture of dibasic phosphate ions (HPO4 2-) and tribasic phosphate ions (PO4 3-), X ranges from about 0.43 to about 0.63, Y ranges from about 0.10 to about 0.18, Z ranges from about 0.29 to about 0.48, X, Y, Z being mole fractions, is provided.