Examples of compounds containing ionic bonds include sodium chloride (NaCl), potassium iodide (KI), calcium fluoride (CaF2), and magnesium oxide (MgO). These compounds are all composed of positively charged ions (cations) and negatively charged ions (anions) held together by electrostatic attraction.