Skip to main content

UserProfile

Interfaces

UserProfileProps

Properties

FeedObjectProps?

optional FeedObjectProps: FeedObjectProps

Props to spread to single feed object

Default
empty object
Source

UserProfile/UserProfile.tsx:123

FeedSidebarProps?

optional FeedSidebarProps: StickyBoxProps

Props to spread to single feed object

Default
{top: 0, bottomBoundary: `#${id}`}
Source

UserProfile/UserProfile.tsx:129

UserFeedProps?

optional UserFeedProps: UserFeedProps

Props to spread to feed component

Default
{}
Source

UserProfile/UserProfile.tsx:147

UserProfileHeaderProps?

optional UserProfileHeaderProps: UserProfileHeaderProps

Props to spread to UserTagStack component

Default
{}
Source

UserProfile/UserProfile.tsx:135

className?

optional className: string

Overrides or extends the styles applied to the component.

Default
null
Source

UserProfile/UserProfile.tsx:69

editEndActions?

optional editEndActions: ReactNode

Actions to be inserted after default user profile actions if it is my profile (edit mode)

Source

UserProfile/UserProfile.tsx:111

editStartActions?

optional editStartActions: ReactNode

Actions to be inserted before default user profile actions if it is my profile (edit mode)

Source

UserProfile/UserProfile.tsx:106

endActions?

optional endActions: ReactNode

Actions to be inserted after default user profile actions

Source

UserProfile/UserProfile.tsx:91

id?

optional id: string

Id of the user profile

Default
'user'
Source

UserProfile/UserProfile.tsx:63

onEditClick()?

optional onEditClick: (user) => void

Click handler for edit button

Default
null
Parameters
ParameterType
userSCUserType
Returns

void

Source

UserProfile/UserProfile.tsx:141

startActions?

optional startActions: ReactNode

Actions to be inserted before default user profile actions

Source

UserProfile/UserProfile.tsx:86

user?

optional user: SCUserType

User Object

Default
null
Source

UserProfile/UserProfile.tsx:75

userId?

optional userId: string | number

Id of the user for filter the feed

Default
null
Source

UserProfile/UserProfile.tsx:81

viewEndActions?

optional viewEndActions: ReactNode

Actions to be inserted after default user profile actions if is not my profile (view mode)

Source

UserProfile/UserProfile.tsx:101

viewStartActions?

optional viewStartActions: ReactNode

Actions to be inserted before default user profile actions if is not my profile (view mode)

Source

UserProfile/UserProfile.tsx:96

widgets?

optional widgets: SCFeedWidgetType[]

Widgets to be rendered into the feed

Default
[UserFollowedCategoriesWidget, UserFollowedUsersWidget]
Source

UserProfile/UserProfile.tsx:117

Functions

UserProfile()

UserProfile(inProps): JSX.Element

API documentation for the Community-JS User Profile Template. Learn about the available props and the CSS API.

This component renders a specific user's profile template. Take a look at our demo component here

Import

import {UserProfile} from '@selfcommunity/react-templates';

Component Name

The name SCUserProfileTemplate can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCUserProfileTemplate-rootStyles applied to the root element.
counters.SCUserProfileTemplate-countersStyles applied to the counters section.
tags.SCUserProfileTemplate-tagsStyles applied to the tags section.
info.SCUserProfileTemplate-infoStyles applied to the info section.
feed.SCUserProfileTemplate-feedStyles applied to the feed section.
actions.SCUserProfileTemplate-actionsStyles applied to the actions section.

Parameters

ParameterTypeDescription
inPropsUserProfileProps

Returns

JSX.Element

Source

UserProfile/UserProfile.tsx:269


UserProfileSkeleton()

UserProfileSkeleton(): JSX.Element

API documentation for the Community-JS User Profile Skeleton Template. Learn about the available props and the CSS API.

Import

import {UserProfileSkeleton} from '@selfcommunity/react-templates';

Component Name

The name SCUserProfileTemplate-skeleton-root can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCUserProfileTemplate-skeleton-rootStyles applied to the root element.

Returns

JSX.Element

Source

UserProfile/Skeleton.tsx:37