Skip to main content

Categories

Interfaces

CategoriesProps

Indexable

[p: string]: any

Other props

Properties

PropertyTypeDescription
CategoriesSkeletonComponent?(inProps) => 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) => 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[]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): 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

Element


CategoriesSkeleton()

CategoriesSkeleton(inProps): 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

Element