Skip to content

Twitter

twitter={{
creator: '@handle',
site: '@site',
cardType: 'summary_large_image',
title: 'Twitter',
description: 'Twitter',
image: 'https://www.example.ie/twitter-image.jpg',
imageAlt: 'Twitter image alt'
}}

When twitter.title or twitter.description is not explicitly set in the twitter prop, they automatically fall back to other available values:

  • twitter.titleopenGraph.titletitle
  • twitter.descriptionopenGraph.descriptiondescription

This allows you to avoid duplication when the same values are shared across meta tags:

<MetaTags
title="Page Title"
description="Page Description"
openGraph={{ title: 'OG Title', description: 'OG Description' }}
twitter={{ cardType: 'summary_large_image' }}
/>
<!-- twitter:title will be "OG Title" -->
<!-- twitter:description will be "OG Description" -->

See out the X(Twitter) documentation for more information.