adverb
cheerfully; spiritedly; vigorously; lively
Describes doing something with energy, enthusiasm, or in a lively manner. Often used with verbs of action, speaking, or greeting.
子どもたちは元気よく遊んでいる。
The children are playing cheerfully.
彼は元気よく「おはよう」と言った。
He said "good morning" spiritedly.
元気 is a noun or na-adjective meaning 'energy, vitality, health'; 元気よく is its adverbial form, used to modify verbs.
Adverbial form of 元気 (genki, 'energy, vitality'), formed by adding よく (yoku) to the stem. The word 元気 itself is composed of 元 (gen, 'origin, source') and 気 (ki, 'spirit, energy').