Swinging twinning on the unit cell level is introduced as a structure-building operation in the solid state. If a parent structure can produce different twin units by swinging (changing the direction of) the twin planes, and each twin unit can be identified in different compounds, the compound can be described as a swinging twinning of the parent structure. The parent structure type of this presentation is the TlI (or CrB) type. It is shown that if the trigonal prisms of the TlI-structure type are alternatingly unoccupied there are three different isostructural AX2-compounds, viz, YO(OH), SrBr 2, and α-PdCl 2. The Hf 3P 2 structure type (including the structures of Sb 2S 3, Th 2S 3, U 2S 3, Np 2S 3, K 2CuCl 3, Cs 2AgCl 3, Cs 2AgI 3, (NH 4) 2CuBr 3, CuPbBiS 3, and Ba 2ZnS 3) is described as a swinging twinning of the YO(OH) structure with one direction of the twin planes. Another direction of the twin planes of YO(OH) gives rise to the Cr 3C 2-structure type (including the structures of K 2AgI 3, Rb 2AgI 3, and (NH 4) 2AgI 3). A third direction of the twin planes in the structures of TlI produces the structure type of FeB if the twin units are only one trigonal prism broad instead of two.