Posts component

Use the Posts component to render a feed of posts and comments as seen on many social networks.

Element: <wy-posts>
Class: WyPosts


First import and configure Weavy and the WyPosts component.

import { Weavy, WyPosts } from "@weavy/uikit-web";

const weavy = new Weavy();
weavy.url = "";
weavy.tokenFactory = async (refresh) => "token_from_server";

Then add the <wy-posts> component to your HTML. Note that you must specify a unique identifier (uid) which automatically creates a corresponding app on your Weavy server when the component is first initialized.

<wy-posts uid="test-feed" name="Test feed"></wy-posts>

The unique identifier (uid) is something you decide what it should be. For apps it's often useful to have a uid that is related to the context where the app is displayed. For example "product-123-feed" or "team-2-feed".


Property Type Description
uid string Unique identifier for the app.
name string Optional display name for the app (used in notifications etc.)
notifications "button-list" | "none" Set the appearance of notifications. Defaults to "button-list".
notificationsBadge "count" | "dot" | "none" Set the appearance of the notification badge. Defaults to "count".

The available features are controlled by your product license. To disable a feature you can use the following boolean attributes/properties.

Property Description
noAttachments Disable the possibility to upload local attachments.
noCloudFiles Disable the cloud file picker (Google Drive, Dropbox etc).
noEmbeds Disable creating embeds from urls in the post text.
noMeetings Disable Zoom meetings.
noMentions Disable the possibility to mention other people in the directory.
noPreviews Disable previews of files.
noReactions Disable the possibility to add emoji reactions to a message.
noPolls Disable possibility to create a poll.
noComments Disable comments on a post.

Example: Render a posts component without embeds and polls.

<wy-posts uid="test-feed" noEmbeds noPolls></wy-posts>