Composers that lent their efforts to Haydn's, making the string quartet perhaps the most prestigious musical medium, were Mozart and Beethoven, followed soon after by Schubert, Schumann and Brahms. But it can be said, I think, that the preferred medium in the 19th century was really not chamber music, but rather the symphony and opera. So you can see a decline in both quantity and quality of the string quartet throughout the century.
Rather surprisingly, though, it saw a considerable revival in the 20th century and that was through the efforts of a number of composers. The first on the scene was actually Arnold Schoenberg whose first quartet was written in 1905:
Schoenberg's quartet dates from before his innovative ideas on serialism and didn't make much of a splash. You might think of it as more post-Brahmsian than as the first 20th century quartet.
That title is usually given to Bela Bartók whose first quartet dates from the beginning of 1909. Here is the first movement played by the Emerson Quartet:
That does have a new air to it and Bartók followed it with five others. One of the most characteristic is the String Quartet No. 3, written in 1927:
That is full of new and striking ideas. Another interesting quartet was written just the next year by Leoš Janáček:
One of the most well-known quartets of the century is by Schoenberg's student, Alban Berg. His Lyric Suite dates from slightly earlier, 1925/26. Oddly, there doesn't seem to be a complete version on YouTube, so here are the first three parts:
A bit later one of the most important bodies of string quartet repertoire was begun by Shostakovich with his String Quartet No. 1 dating from 1938:
After this modest beginning, he wrote a lot more important quartets, such as this one, dating from 1960:
A composer who also wrote a lot of interesting quartets was Mieczysław Weinberg. Here is an excerpt from his String Quartet No. 3
Composers have continued to write string quartets pretty regularly as it became a 20th century medium of choice. Some of note are George Crumb's Black Angels for electric string quartet from 1970:
Morton Feldman, String Quartet No. 2 from 1983:
You don't get the whole thing because it is six hours long! Both Steve Reich and Philip Glass have made important contributions. Here is Steve Reich's Different Trains:
And the first part of Philip Glass' String Quartet No. 5:
Like the violin concerto, the string quartet just seems to go on and on, inspiring each new generation of composers.
I want to end with one of the newest pieces for string quartet that I heard just a couple of months ago in a concert by the young Catalyst Quartet. The piece is called Strum and it was composed by Jessie Montgomery, one of the violinists in the ensemble. In the photo accompanying the clip, she is the young woman in the black dress on the right. This piece is just a year or so old and it has a pretty good groove: