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 Name | Global class | Description |
---|---|---|
root | .SCWidget-root | Styles applied to the root element. |
Extends
Indexable
[p
: string
]: any
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
autoHide? | boolean | Hides this component Default false | - |
category? | SCCategoryType | Category Object Default null | - |
categoryFollowButtonProps? | CategoryFollowButtonProps | Props to spread to follow button Default {} | - |
categoryId? | number | Category Id Default null | - |
className? | string | Overrides or extends the styles applied to the component. Default null | WidgetProps .className |
showFollowers? | boolean | Prop to show category followers as secondary text Default true | - |
showTooltip? | boolean | Prop 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 Name | Global class | Description |
---|---|---|
root | .SCCategory-root | Styles applied to the root element. |
categoryImage | .SCCategory-category-image | Styles applied to category image element. |
title | .SCCategory-title | Styles applied to the title element. |
actions | .SCCategory-actions | Styles applied to action section. |
primary | .SCCategory-primary | Styles applied to category primary section (when showTooltip prop is set to true) |
secondary | .SCCategory-secondary | Styles applied to category secondary section (when showTooltip prop is set to true) |
followed | .SCCategory-followed | Styles applied to a category item when it is followed |
autoFollowed | .SCCategory-auto-followed | Styles applied to a category item when auto followed is set to true |
Parameters
Parameter | Type | Description |
---|---|---|
inProps | CategoryProps |
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 Name | Global class | Description |
---|---|---|
root | .SCCategory-skeleton-root | Styles applied to the root element. |
Parameters
Parameter | Type |
---|---|
props | any |
Returns
JSX.Element