Skip to main content

Category

Interfaces

CategoryProps

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

Properties

PropertyTypeDescriptionInherited from
autoHide?booleanHides this component

Default
false
-
category?SCCategoryTypeCategory Object

Default
null
-
categoryFollowButtonProps?CategoryFollowButtonPropsProps to spread to follow button

Default
{}
-
categoryId?numberCategory Id

Default
null
-
className?stringOverrides or extends the styles applied to the component.

Default
null
WidgetProps.className
showFollowers?booleanProp to show category followers as secondary text

Default
true
-
showTooltip?booleanProp to show category name tooltip

Default
false
-

Functions

Category()

Category(inProps): JSX.Element

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

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

Import

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

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCCategory-rootStyles applied to the root element.
categoryImage.SCCategory-category-imageStyles applied to category image element.
title.SCCategory-titleStyles applied to the title element.
actions.SCCategory-actionsStyles applied to action section.
primary.SCCategory-primaryStyles applied to category primary section (when showTooltip prop is set to true)
secondary.SCCategory-secondaryStyles applied to category secondary section (when showTooltip prop is set to true)
followed.SCCategory-followedStyles applied to a category item when it is followed
autoFollowed.SCCategory-auto-followedStyles applied to a category item when auto followed is set to true

Parameters

ParameterTypeDescription
inPropsCategoryProps

Returns

JSX.Element

Source

packages/react-ui/src/components/Category/Category.tsx:104


CategorySkeleton()

CategorySkeleton(props): JSX.Element

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

Import

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

Component Name

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

CSS

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

Parameters

ParameterType
propsany

Returns

JSX.Element

Source

packages/react-ui/src/components/Category/Skeleton.tsx:43