We determine the set of connected components of minuscule affine Deligne-Lusztig varieties for special maximal compact subgroups of unramified connected reductive groups. Partial results are also obtained for non-minuscule closed affine Deligne-Lusztig varieties. We consider both the function field case and its analog in mixed characteristic. In particular, we determine the set of connected components of unramified Rapoport-Zink spaces.
Comment: 69 pages, v2: final version. Numerous modifications to improve readability, and minor corrections. The main results are unchanged