A roof flap is an aerodynamic feature on race cars, mainly stock cars, which functions as an emergency spoiler to prevent the vehicle from lifting off the ground. The flaps are stowed during normal vehicle operation; however, in certain situations, e.g., if the vehicle goes into a spin, particularly if it is facing backwards, the flaps deploy to disrupt the air flow over the roof and reduce the lift force on the vehicle.
