logo-icon
STW UI

Post

Post is used to display social content.

Usage

svelte
import { Post } from 'stwui';
// OR
import Post from 'stwui/post'; // for tree shaking

Simple Post

Joe Montana

Sep 11, 22, 12:00 AM

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With Actions

Joe Montana

Sep 11, 22, 12:00 AM

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Like
Like
Share

With Status

Joe Montana

Sep 11, 22, 12:00 AM

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
2
Like
Like
Share

Post With Images

Joe Montana

Sep 11, 21, 12:00 AM

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
2
Like
Like
Share

Post With 4+ Images

Joe Montana

Sep 11, 22, 12:00 AM

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
2 Comments
Like
Like
Share

Post Props

bordered boolean false

Post Slots

header <Post.Header slot="header" />
content <Post.Content slot="content" />
default
images <Post.Images slot="images" />
status <Post.Status slot="status" />
actions <Post.Actions slot="actions" />

Post.Header Slots

avatar <Post.Header.Avatar slot="avatar" />
creator <Post.Header.Creator slot="creator" />
created <Post.Header.Created slot="created" />
extras <Post.Header.Extras slot="extras" />

Post.Header.Avatar Props

src string
alt string avatar
placeholder boolean true

Post.Header.Creator Slots

default

Post.Header.Created Slots

default

Post.Content Slots

default

Post.Images Props

images CarouselSlide[] []
handleClick ((index: number) => void) | undefined
includeLightBox boolean true
activeSlide number 0
showClose boolean true
lightboxActions LightboxAction[] []

Post.Status Props

likes string[] []
comments string[] []

Post.Actions Slots

default

Post.Actions.Action Slots

icon <Card.Actions.Action.Icon slot="icon" />
label <Card.Actions.Action.Label slot="label" />
default

Post.Actions.Action.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Post.Actions.Action.Label Slots

default

Post Class Identifiers

stwui-post
stwui-post-header
stwui-post-header-avatar-wrapper
stwui-post-header-avatar
stwui-post-avatar-placeholder
stwui-post-header-creator-wrapper
stwui-post-header-creator-wrapper-created
stwui-post-header-created-wrapper-created
stwui-post-header-extras
stwui-post-content
stwui-post-images
stwui-post-status
stwui-post-actions
stwui-post-action
stwui-post-action-icon
stwui-post-action-label