Melt butter in a large saucepan over medium heat. Add onions, garlic and thyme leaves and cook for 10 minutes, stirring occasionally. Lower heat to medium low, cover and cook for 1 hour, stirring occasionally.
Add sugar, kosher salt and pepper and cook for 10 minutes.
Add balsamic vinegar and cook for another 10 minutes or until onions are caramelized.
Preheat oven to 400°F.
Place bread halves on a baking sheet, cut side up. Sprinkle evenly with shredded cheese then spoon caramelized onion on top.
Bake for 10-15 minutes or until cheese has melted and bread turns golden brown.
Cut into pieces and serve immediately. Garnish with extra thyme leaves if desired.