Yes, dividends are earnings which are subject to the age rules.
However, IRAs work on a first in, first out principle. In a Roth IRA, the first out would be your contributions which you can take out anytime without penalty. If you took out the value of all your contributions, you would then be taking taxable (and subject to the 10% extra tax) earnings.
Sent from my iPhone using Tapatalk