An optical material comprising an ionic liquid and a polymer gel including a light controlling material, wherein the polymer gel absorbs and/or releases the ionic liquid in accordance with a temperature change. Also provided is an optical element comprising two substrates and the optical material between the two substrates.