Component: <embetty-tweet>
The <embetty-tweet>
component is used to embed tweets from X (formerly Twitter).
Basic Usage
To embed a tweet, use the <embetty-tweet>
tag with the status
attribute set to the ID of the tweet.
<embetty-tweet status="950371792874557440"></embetty-tweet>
Attributes
status
(Required) The ID of the tweet. This is the numerical string found at the end of the tweet's URL.
- Type:
string
- Example:
status="950371792874557440"
include-thread
(Optional) If this boolean attribute is present, Embetty will display the conversation thread leading up to the specified tweet, providing context for replies.
- Type:
boolean
- Example:
<embetty-tweet status="916618051906428928" include-thread></embetty-tweet>
Styling
The appearance of the tweet embed can be customized using CSS variables. These variables allow you to override default styles to match your site's theme.
--embetty-border-color
: The border color of the embed.--embetty-font-family
: The font family used within the embed.--embetty-link-color
: The color for links within the tweet text.
Example
.my-theme {
--embetty-border-color: #ff0000;
--embetty-font-family: 'Comic Sans MS', cursive;
--embetty-link-color: #ff0000;
}
<embetty-tweet class="my-theme" status="934386458852495360"></embetty-tweet>