In 1771, Goethe had written the poem "Heidenröslein" which tells of a young man's plucking of a feisty rose.
In "Das Veilchen" it is a careless girl who destroys a violet, a metaphor for a young man's heart.
The entry of the shepherdess is marked by a modulation to D major; this is followed by a four-bar segment which summarises the violet's happy mood – and a general pause which precedes the mood swing of the second verse, a change of key to G minor to describe the violet's longing.
The narration of the third verse is a recitativo accompagnato in E-flat major culminating in the trampling of the violet which is emphasised by a following general pause.
Then Mozart adds two phrases of his own as a coda; in recitative, in free time and using only two notes: "Das arme Veilchen!"
), a long general pause, and closing the song a tempo with a quotation from the third line: "es war ein herzigs Veilchen."
Other composers who have set this poem to music (besides those mentioned above as composers of Goethe's singspiel) include Philipp Christoph Kayser (1776), Anton Schweitzer (1777), Joseph Anton Steffan (1779), Johann Friedrich Reichardt in 1780 and in 1783, (the second setting was praised by Clara Kathleen Rogers and Felix Mendelssohn) Karl Siegmund von Seckendorff (1779), Friedrich Heinrich Himmel (c. 1807), Peter Josef von Lindpaintner (1815), Václav Tomášek (1815), Carl Gottlieb Reissiger (1827), Clara Schumann (1853), Nikolai Medtner (1909), and Othmar Schoeck (1915).
Musical settings in other languages include the composers Halfdan Kjerulf to a Danish translation by Adam Oehlenschläger, Johan Erik Nordblom [sv] to a Swedish text, and an English version by Clara Kathleen Rogers.