Skip to main content

User

Interfaces

UserProps

API documentation for the Community-JS Widget component. Learn about the available props and the CSS API.

Import

import {Widget} from '@selfcommunity/react-ui';

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCWidget-rootStyles applied to the root element.

Extends

Indexable

[p: string]: any

Any other properties

Properties

PropertyTypeDescriptionInherited from
actions?ReactNodeProp to add actions Default null-
badgeContent?anyBadge content to show as user avatar badge if show reaction is true.-
buttonProps?ButtonBasePropsProps to spread to the button Default {}-
className?stringOverrides or extends the styles applied to the component. Default nullWidgetProps.className
followConnectUserButtonProps?FollowUserButtonProps | FriendshipButtonPropsProps to spread to follow/friendship button Default {}-
handleIgnoreAction?(u) => voidHandles actions ignore Default null-
isGroupAdmin?booleanIf true, shows a custom label next to the user username Default false-
secondary?ReactNode--
showFollowers?booleanProp to show user followers as secondary text Default false-
user?SCUserTypeUser Object Default null-
userId?numberUser Id Default null-

Functions

User()

User(inProps): Element

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

This component renders a user item. Take a look at our demo component here

Import

import {User} from '@selfcommunity/react-ui';

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCUser-rootStyles applied to the root element.
avatar.SCUser-avatarStyles applied to the avatar element.
staffBadgeLabel.SCUser-staff-badge-labelStyles applied to the staff badge label element.

Parameters

ParameterTypeDescription
inPropsUserProps

Returns

Element


UserSkeleton()

UserSkeleton(props): Element

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

Import

import {UserSkeleton} from '@selfcommunity/react-ui';

Component Name

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

CSS

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

Parameters

ParameterType
propsWidgetProps

Returns

Element