Wikipedia
Onychomadesis
Onychomadesis is a periodic idiopathic shedding of the nails beginning at the proximal end, possibly caused by the temporary arrest of the function of the nail matrix.
One cause in children is hand foot and mouth disease. This generally resolves without complication.
Onychomadesis can also occur if the nail is damaged or suffers a loss of blood supply, i.e. due to a bruise. The nailbed turns black, and the nail drops off shortly afterwards. It takes around 6 to 12 months to regrow.