Posts component
<wy-posts> | WyPosts
Use the Posts component to render a feed of posts and comments as seen on many social networks.
Importing
If you installed the UIKit with npm
you can use the following snippet to import the component into your project.
Otherwise, if you installed the UIKit as a <script>
you can ignore this section.
import { WyPosts } from "@weavy/uikit-web";
Examples
As seen in this example, specifying the app identifier (uid
) is required, and automatically creates a corresponding app on your Weavy environment when the component is first initialized.
<wy-posts uid="test-posts" name="Test feed"></wy-posts>
Here's another example that render a feed without embeds and polls.
<wy-posts uid="test-feed" noEmbeds noPolls></wy-posts>
It's often useful to base the
uid
on something that identifies the location where the component is rendered. Typically you would use something like a product id, page id, path or URL.
Properties
Most properties are optional and/or has sensible default values. Required properties are indicated with an asterisk (*).
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" . |
noAttachments |
boolean |
Disable the possibility to upload local attachments. |
noCloudFiles |
boolean |
Disable the cloud file picker (Google Drive, Dropbox etc). |
noEmbeds |
boolean |
Disable creating embeds from urls in the post text. |
noGoogleMeet |
boolean |
Disable the Google Meet video meetings integration. |
noMentions |
boolean |
Disable the possibility to mention other people in the directory. |
noMicrosoftTeams |
boolean |
Disable the Microsoft Teams video meetings integration. |
noPreviews |
boolean |
Disable previews of files. |
noReactions |
boolean |
Disable the possibility to add emoji reactions to a message. |
noPolls |
boolean |
Disable possibility to create a poll. |
noComments |
boolean |
Disable comments on a post. |
noZoomMeetings |
boolean |
Disable the Zoom video meetings integration. |
Learn more about attributes and properties.
Events
Name | Description |
---|---|
wy:link |
Emitted when a notification is clicked. |
Learn more about events.