4x2 Grid Example (8 items):
<legion-social layout="grid" rows="2" cols="4" width="800" height="400" api-url="${window.location.origin}" community-url="${window.location.origin}/community" channel="announcements"></legion-social>
Provide community-url on
<legion-social> when using
layout="grid". Clicking an image opens your page in a
new tab with the following query params: postId,
mediaIndex, gridIndex,
utm_source, utm_medium,
utm_campaign.
On your community page, read the query params and scroll/focus to the post.
For feed layout, specify a height to create a scrollable container with a "Load more posts" button. This is useful for embedding feeds in specific page sections with limited space.
When height is specified, the feed becomes scrollable and shows a "Load more posts" button at the bottom to fetch additional content without expanding the container height.
The social widget requires a valid JWT token for the full feed layout. The grid layout is public and only displays images.
auth-token for layout="feed" to enable
comments/likes
auth-token is not requiredYou can customize the widget container with CSS: