How long a person with L1B visa stay after resignation

Hi,

I am on L1 B visa. I would like to resign from my company and join another company in my home country.

My visa validity is till Aug 2018. If I resign in June 2018 , till how many days, after I get relieved from my current company, can I stay in USA ?

Regards,

Your stay is valid as long as you are on payroll and a check is being processed by company in your name. Once that relationship ends, your visa validity is extinguished. Once you enter notice period (imminent departure) with present employer, the visa is valid until you leave but some employers can put you at risk by requesting immediate revocation. The latter situation is rare.

Thanks, Shankar.
I have heard about grace period of 60 days or until visa validity. Is it still applicable law?
I was planning to leave the USA in the first week of July. In case my company relieves me in few days of resigning ( in mid-June), then will I be able to stay for a period of 5-20 days more?

Thanks