source
| Props |
Type |
Default |
Description |
src |
String |
avatar |
specifies the source of the avatar image to the avatar wrapper |
alt |
String |
avatar |
specifies the alt text for the avatar |
sm |
Boolean |
false |
specifies whether or not to use a small image |
className |
String |
'' |
specifies any custom classes to be added layout for the avatar image |
status |
DefaultMantineColor |
null |
a string representing the color of the status indicator, or null if no status indicator should be displayed |
import Avatar from './common/Avatar';
<Avatar sm />;
<Avatar src={avatar.png} alt='user-avatar' />;
<Avatar src={avatar.png} status={} />;
source
| Props |
Type |
Default |
Description |
badge |
Badge |
null |
The badge object with properties for picture, label, message, and users. |
className |
String |
'' |
An optional string for customizing the CSS class of the component. |
import Badge from './common/Badge';
<Badge badge={badge} />;
source
| Props |
Type |
Default |
Description |
title |
String |
title |
a string that sets the banner title |
subtitle |
String |
subtitle |
a string that sets the banner subtitle |
className |
String |
'' |
a string that allows for the addition of custom classes to the banner wrapper |
icon |
String |
BiConfused |
a React component that sets the banner icon |
import Banner from './common/Banner';
<Banner title='Profile' subtitle='Welcome to your account dashboard!' />;
source
No Props Yet
import CreatePost from './common/CreatePost';
<CreatePost />;
source
| Props |
Type |
Default |
Description |
onEmojiSelect |
Function |
(params: any) => void |
callback function that receives an object with information about the selected emoji. |
import EmojiPicker from './common/EmojiPicker';
<EmojiPicker onEmojiSelect={} />;
source
| Props |
Type |
Default |
Description |
galleryId |
String |
just-gallery-id |
provide an ID for the gallery. |
gallery |
String[] |
[] |
specify an array of image URLs. |
full |
Boolean |
false |
determine if the gallery should be displayed in full mode. |
id |
String |
uuidv4() |
pass and id to plr |
import Gallery from './common/Gallery';
<Gallery gallery={[]} />;
source
| Props |
Type |
Default |
Description |
className |
String |
'' |
allows adding additional classes to the group card. |
colView |
Boolean |
false |
determines whether the group card should be displayed in a column view or not. |
group |
Group |
null |
object field that contains the group information |
import Group from './common/Group';
<Group group={group} />;
// column View
<Group group={group} colView />;
source
| Props |
Type |
Default |
Description |
cover |
string |
'' |
string representing the URL of the cover image |
avatar |
string |
'' |
string representing the URL of the avatar image |
name |
string |
'' |
string representing the user's name |
username |
string |
'' |
string representing the user's username |
verified |
boolean |
'' |
boolean representing whether the user is verified or not |
extraInfo |
ReactElement |
<></> |
JSX element representing any additional information to display in the banner |
className |
string |
'' |
string representing additional CSS classes to apply to the banner |
import InfoBanner from './common/InfoBanner';
<InfoBanner user={user} />;
source
| Props |
Type |
Default |
Description |
src |
string |
'' |
specifies the source of the media to be played. |
MediaType |
audio |
'video' |
specifies the type of media to be played, either 'audio' or 'video'. |
title |
string |
'Plyr Title' |
specifies the title of the media to be played. |
import PlyrViewer from './common/PlyrViewer';
<PlyrViewer src='audio.mp3' MediaType='audio' />;
<PlyrViewer src='video.mp3' MediaType='video' />;
source
| Props |
Type |
Default |
Description |
className |
String |
'' |
A string field that allows for additional CSS classes to be added to the post card wrapper. |
post |
Post |
null |
The main field of the class, which is an object containing information about the post, including the user who posted, the post content, and the number of likes, comments, and shares. |
isShared |
Boolean |
false |
A boolean field that specifies whether the post is a shared post or not. If true, the post footer is not displayed. |
import Post from './common/Post';
<Post post={post} />;
<Post post={post} isShared />;
source
- Skeleton
- Friend
- Post
- Badge
- Comment
| Props |
Type |
Default |
Description |
repeat |
number |
1 |
number of Skeleton repetition |
variant |
SkeletonVariant |
'' |
The 'Skeleton', 'Friend', 'Post', 'Badge', and 'Comment' components are defined within the function and are used as the different variants of the loading skeleton UI. |
import Skeleton from './common/Skeleton';
<Skeleton variant='post' repeat={6} />;
<Skeleton variant='friend' repeat={6} />;
<Skeleton variant='badge' repeat={6} />;
source
| Props |
Type |
Default |
Description |
taps |
SingleTap[] |
[] |
array of taps |
import Taps from './common/Taps';
<Taps taps={TAPS} />;
source
| Props |
Type |
Default |
Description |
noFontSizes |
Boolean |
false |
specifies if hide font size controller or not |
content |
String |
'' |
the initial content of the editor |
getText |
(content: { text: string; html: string }) => void |
(data: { text: string; html: string }) => console.log(data) |
callback function to retrieve the text content. |
import TiptapEditor from './common/TiptapEditor';
<TiptapEditor content={initContent} />;
<TiptapEditor
content={initContent}
getText={(content: { text: string; html: string }) => {}}
/>;
source
| Props |
Type |
Default |
Description |
user |
User |
null |
object that contains information about the user, such as their name, username, avatar, cover image, and badges. |
className |
String |
'' |
a string that represents the CSS class name for the component. |
import User from './common/User';
<User user={user} />;
source
Using day.js package to create timeToX helper function that return a value of readable format between passed date and now.
timeToX('1990-01-01'); //> "31 years ago"
source
Converts long numbers into pretty, human-readable strings.
formateNumber(2000); //> 2K
formateNumber(2500); //> 2.5K
Converts long sizes into pretty, human-readable unit.
formateUnit(1440000); //> 1.44MB