The dough, which is the same as that used for profiterole, is piped into an oblong shape with a pastry bag and baked until it is crisp and hollow inside. Once cool, the pastry then is filled with a coffee- or chocolate-flavoured pastry cream (crème pâtissière), custard or whipped cream, and topped with fondant icing of the same flavour as the filling. Other fillings include pistachio- and rum-flavoured custard, fruit-flavoured fillings, or chestnut purée.
In some parts of the United States, long johns are marketed under the name éclairs, though the two are not identical. A long john uses donut pastry and is typically filled with vanilla pudding, making it a simpler and inexpensive alternative to the éclair.
The Cadburys chocolate and confectionery company also sells a chocolate-filled candy by the name in certain parts of the world. The candy is markedly different to the pastry, being a hard dairy-toffee filled with chocolate.
The éclair probably originated in France during the nineteenth century. The word is first attested both in English and in French in the 1860s. Some food historians speculate that éclairs were first made by Antonin Carême (1784-1833), the famous French chef. The first known English-language recipe for éclairs appears in the Boston Cooking School Cook Book by Mrs. D.A. Lincoln, published in 1884.
"Éclair" is French for "lightning," though the connection is obscure.