This disclosure relates to heterocyclics as selective inhibitors of the fibroblast growth factor receptor 4 (FGFR-4), in particular relates to a compound of Formula I or a pharmaceutically acceptable salt thereof, and a pharmaceutical composition including the compound.