Custom metric widgets for text and codes