1 tbsp sherry or red wine vinegar (stirred into the onions after they are caramelised)
salt and pepper to taste
For the white sauce:
2 tbsp butter or vegan butter
2½ tbsp flour
2½ cups milk or oat milk
¼ tsp dried thyme
pinch of nutmeg
cayenne to taste
salt and pepper to taste
For the topping:
⅔ cup panko or other bread crumbs
2 tbsp melted butter or vegan butter
Method
Slice the onions with the grain (this helps the pieces stay together).
Heat the butter in a pan on medium heat and cook the onions with a pinch of salt for about 15 minutes until nicely caramelised, soft and brown. Stir in the vinegar, cook for a few more minutes and set aside.
For the white sauce, melt the butter in a pan and whisk in the flour. Cook the flour and butter together for about 3 minutes to form a roux.
Next, slowly whisk in the cold milk and season with salt, cayenne pepper and nutmeg.
Bring to a simmer, let it cook for a couple of minutes and turn off the heat and set aside.
Next, prep the beans by trimming the ends and optionally cutting them in half.
Blanch the beans in boiling salted water for about 3-4 minutes then drain well.
To assemble, take a 9x13“ casserole dish and spoon in half of the caramelised onions.
Add the drained beans on top, make sure they're evenly spread out and season well with salt and pepper. Pour over the white sauce, spreading evenly. Add half the cheese, if using, then spread over the remaining half of the onion mixture.
Sprinkle the top with the breadcrumbs mixed with melted butter and add the rest of the cheese, if using.