Skip to content

twitter-post

A post with slots for replacing its parts.

Assign a TwitterPost object to .data. Assign display settings to .options. Reassign the object to update the component.

import 'twitter-components/register'
const element = document.querySelector('twitter-post')
element.data = data
element.options = { theme: 'dark', countFormat: 'full' }
  • default
  • avatar
  • header
  • media
  • quote
  • card
  • actions
  • footer
  • post
  • details

See settings for the shared options and composition for slots and events. Each component uses only the settings that apply to it.