Ingredients

5 tbsp. butter, divided, plus more room temperature for brushing

2 large yellow onions, thinly sliced

Kosher salt

8 oz. cavatappi or other short curly pasta

2 tbsp. all-purpose flour

2 1/2 c. whole milk

1 c. grated fontina cheese

2 1/2 c. grated Gruyère

1 c. shredded sharp white cheddar

1 tsp. Dijon mustard

Pinch of cayenne pepper

1 tsp. fresh thyme leaves, plus more for garnish

Preparation

Step 1Preheat oven to 350°. Brush 4 to 6 ramekins (depending on size) or small ovenproof baking dishes with butter. Alternatively, brush one large baking dish with butter. Step 2In a large skillet, melt 3 tablespoons of the butter over medium. Add the onions and a pinch of salt and cook, stirring occasionally, until they are golden, about 30 minutes.Step 3Cook pasta in a large pot of boiling salted water, following package directions until al dente. Drain pasta.Step 4In a medium saucepan, melt the remaining 2 tablespoons butter over medium-high. Add flour and cook, stirring, 1 minute. While whisking, slowly pour in milk until combined. Bring to a boil and reduce heat to medium. Simmer, stirring, until sauce is thickened, about 6 minutes. Stir in fontina, 1 cup of the gruyere, and cheddar until cheese is melted. Remove from the heat. Stir in the pasta, caramelized onions, Dijon, thyme, and cayenne. Season with salt and pepper.Step 5Divide mixture among ramekins and top each ramekin with the remaining gruyère. Bake until sauce is bubbly around the edges, about 20 minutes. Step 6Switch oven to broil and broil until cheese is golden, about 2 minutes. Garnish with more thyme before serving.