Skip to content

Ngx meta.twittercard

Home > @davidlj95/ngx-meta > TwitterCard

TwitterCard interface

Twitter Cards module metadata values that can be set.

Signature:

export interface TwitterCard 

Properties

Property Modifiers Type Description
card? readonly TwitterCardType | null

(Optional) The card type.

Used with all cards.

If an OpenGraph.type, OpenGraph.title and OpenGraph.description exist in the markup but TwitterCard.card is absent, then a summary card may be rendered.

Check out TwitterCardType type for a list of constants you can use to specify the card's type.

creator? readonly TwitterCardCreator | null

(Optional) @username or Twitter ID of the content creator.

Used in TwitterCard.creator with type TwitterCardCreator

description? readonly string | null

(Optional) Description of content (maximum 200 characters).

Used with summary, summary_large_image, player cards.

Equivalent to OpenGraph.description. This one can be omitted if equivalent is set.

Can be set with GlobalMetadata.description.

image? readonly TwitterCardImage | null

(Optional) Image for the card.

Equivalent to OpenGraph.image. This one can be omitted if equivalent is set.

Can be set with GlobalMetadata.image.

Used in TwitterCard.image with type TwitterCardImage

site? readonly TwitterCardSite | null

(Optional) @username or Twitter ID of the author of the website.

Either TwitterCardSiteUsername or TwitterCardSiteId is required.

Used in TwitterCard.site with type TwitterCardSite

title? readonly string | null

(Optional) Title of content (max 70 characters).

Used with summary, summary_large_image, player cards.

Equivalent to OpenGraph.title. This one can be omitted if equivalent is set.

Can be set with GlobalMetadata.title.