adverb (for)
a brief period of time.
correct spelling only when used as an adverb and not in a
prepositional phrase. Otherwise, in a prepositional phrase, it is two words. As a noun phrase, it is two words.
Adverb: I will wait awhile for you, but after that
I'm out.
Prep Phrase: I will wait for a while, but after that I'm out.
Noun Phrase: A while has gone by since we started this project.