If is an English preposition, as seen in If it's sunny tomorrow, (then) we'll have a picnic.
As a preposition, if normally takes a clausal complement (e.g., it's sunny tomorrow in if it's sunny tomorrow). That clause is, within the conditional construction, the condition (or protasis) on which the main clause (or apodosis) is contingent.[1]: 599–600, 738 In such cases, if can be paraphrased as "in case" or "contingent on the case that".
If it's sunny tomorrow is a preposition phrase, and within a conditional construction it functions as an adjunct.
Where if takes a noun phrase (NP) or adjective phrase (AdjP) complement, the construction is concessive rather than conditional: The ascent was exhilarating, if NP[a challenge]/AdjP[challenging]).[1]: 737–738
Traditional grammar books commonly treat if, often understood as a single word encompassing both this preposition and the homonymous subordinator, as a "subordinating conjunction", a category covering a broad range of clause-connecting words.[1]: 599–600, 738, 1011–1014
References
- 1 2 3 Huddleston, Rodney; Pullum, Geoffrey K. (2002). The Cambridge Grammar of the English Language. Cambridge: Cambridge University Press. ISBN 978-0-521-43146-0.