Open this example in the interactive library
Live preview
Source code
// components/RoleBadgeWithExplanation.tsx
export default function RoleBadgeWithExplanation({
name = "Mira Bell",
role = "Editor",
}: { name?: string; role?: string } = {}) {
return <abbr title={name + " has the " + role + " role"}>{role}</abbr>;
}
