In a large skillet, add your butter, and then over medium-high heat, simmer until the butter is melted. Then add in your onions, cook for about 8 to 10 minutes, or until the onions are transfluent and softened. When cooking, add the garlic, and thyme, simmer until the onions are caramelized about 15 to 20 minutes.
Remove the onions from the heat, mix in the sugar, salt, black pepper, and mix until all of the sugar has been dissolved. Return the skillet to a medium to heat, mix in the balsamic vinegar, cook for another 5 to 10 minutes. Until the liquid has evaporated, remember to stir frequently not to burn the onions.
Slice your bread into slices, about 1 inch thick. Sprinkle the cheese on top of the bread, followed by a couple of tablespoons of the onion mixture. Set the bread into the air fryer and cook for about 6 to 8 minutes at 350 degrees F, air fryer setting, or until the cheese has melted.
Garnish with thyme right before serving.