Peel and slice the onions into thick wedges, about 1-inch wide.
In a small saucepan over medium heat, melt the unsalted butter. Add the minced garlic, thyme, salt, and pepper, stirring until fragrant.
In a large mixing bowl, combine the onion wedges with the garlic butter mixture. Toss well to coat the onions evenly.
Spread the coated onions in a single layer on a baking sheet lined with parchment paper.
Place the baking sheet in the preheated oven and roast for 30-35 minutes, or until the onions are golden brown and tender. Stir halfway through for even cooking.
If using, drizzle the balsamic vinegar over the onions during the last 5 minutes of roasting for added flavor.
Remove from the oven and garnish with fresh parsley, if desired.
Transfer the roasted onions to a serving dish and enjoy the aromatic flavors.