AbstractQuestionsBaltic coastal meadows are ecologically unique habitats that have been severely impacted by habitat loss and environmental change. To determine the effects of habitat loss and isolation on their plant communities, we analysed the relationships between species richness and habitat size and amount. Because coastal meadows host species with a vast array of traits, we expected responses to vary between species groups.LocationSwedish Baltic coast.MethodsWe inventoried the presence of vascular plant species in twenty‐eight 1‐m2 plots placed along edaphically defined transects in fifteen coastal meadows. We determined the richness of three species groups: all species, halophytes and inland grassland specialists. We then mapped the habitat for coastal grassland plants using GIS overlay analysis. Using this habitat map, we calculated two variables: “habitat size” and “habitat amount”. We tested correlations between species richness measures and habitat variables, as well as determining the distribution of species traits within meadows.ResultsWe recorded 174 plant species, of which 6 were halophytes and 35 were inland grassland specialists. Species traits coincided with edaphic sea‐to‐land gradients. Halophyte and inland grassland specialist richness were significantly correlated with both habitat variables (r = 0.52–0.71). No correlations were found with total species richness. Our habitat map showed that there are 8,900 ha of managed Baltic coastal meadow left in Sweden, mostly in the south.ConclusionsSpecies traits and distribution play a major role in determining persistence in the face of habitat loss and environmental change. This is especially true for some halophyte populations, which are more susceptible to habitat size and isolation because of their specialisation. Furthermore, they risk being squeezed between the dual threats of encroaching succession and sea‐level rise. Preventing habitat loss, restoring meadows and increasing connectivity is crucial for the persistence of specialist plant species.