Skip to main content

Categories

Interfaces

CategoriesProps

Indexable

[p: string]: any

Properties

PropertyTypeDescription
CategoriesSkeletonComponent?(inProps: any) => ElementCategorySkeletonComponent component
Usefully to override the single Category skeleton render component

Default
Skeleton
CategoriesSkeletonProps?CategoriesSkeletonPropsProps to spread to single category skeleton object

Default
{variant: 'outlined'}
CategoryComponent?(inProps: CategoryProps) => ElementCategoryComponent component
Usefully to override the single Category render component

Default
Category
CategoryComponentProps?CategoryPropsProps to spread to single category object

Default
{variant: 'outlined', ButtonBaseProps: {disableRipple: 'true'}}
className?stringOverrides or extends the styles applied to the component.

Default
null
filters?ElementFilters component

Param
handleFilterCategories?(categories: SCCategoryType[]) => SCCategoryType[]Override filter func

Default
null
prefetchedCategories?SCCategoryType[]Prefetch categories. Useful for SSR.
Use this to init the component with categories

Default
null
showFilters?booleanShow/Hide filters

Default
true

CategoriesSkeletonProps

Properties

PropertyTypeDescription
CategorySkeletonProps?anyOverrides or extends the styles applied to the component.

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

Default
null

Functions

Categories()

Categories(inProps): JSX.Element

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

The Categories component renders the list of all available categories. Take a look at our demo component here

Import

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

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCCategories-rootStyles applied to the root element.
filters.SCCategories-filterStyles applied to the filter.
categories.SCCategories-categoriesStyles applied to the list of categories.
category.SCCategories-categoryStyles applied to the of category element.
noResults.SCCategories-no-resultsStyles applied to no results section.

Parameters

ParameterTypeDescription
inPropsCategoriesProps

Returns

JSX.Element

Source

packages/react-ui/src/components/Categories/Categories.tsx:128


CategoriesSkeleton()

CategoriesSkeleton(inProps): JSX.Element

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

Import

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

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCCategories-skeleton-rootStyles applied to the root element.
categories.SCCategories-categoriesStyles applied to the categories' element.

Parameters

ParameterType
inPropsCategoriesSkeletonProps

Returns

JSX.Element

Source

packages/react-ui/src/components/Categories/Skeleton.tsx:53