English grammar- Preposition

Which preposition should be used after the adjective 'nice'? It is nice (of/for) you to share some motivational tips with your students.


Solution 1:

It is nice of you means you are showing gratitude to that person. You are thankful to the person who gave the lecture.

It is nice for you means you are telling the person that they have done something good for themselves.

There is no rule of prepositions to use with nice. It just depends on the syntax.