Documentation
Entity

Entity

The Entity component serves as a comprehensive container designed to display various elements like thumbnails, actions, menus, and checkboxes in a structured format. It is highly customizable, supporting placeholders for loading states and responsive layouts.

Usage

First of all, you need to import the Entity component along with its related subcomponents from the kitchn package.

import { Entity, EntityField, EntityFieldTitle, EntityFieldDescription } from "kitchn"

Fields

Thumbnails

Menu

Actions

Checkbox

Mixed

Skeleton

Props

NameTypeDefaultRequiredDescription
thumbnailReact.ReactNodeundefinedNoThumbnail to be displayed on the left side of the entity.
menuContentReact.ReactNodeundefinedNoContent for the dropdown menu associated with the entity.
actionsReact.ReactNodeundefinedNoActions (e.g., buttons) to be displayed on the right side of the entity.
checkboxReact.ReactNodeundefinedNoCheckbox element to be displayed on the left side of the entity.
placeholderbooleanfalseNoIf true, displays placeholder skeletons for all content.

EntityField Props

NameTypeDefaultRequiredDescription
titlestringundefinedYesTitle text to be displayed in the field.
descriptionReact.ReactNodeundefinedNoDescription text to be displayed below the title.
activebooleantrueNoIf false, dims the title and description to indicate inactive state.
labelbooleanfalseNoIf true, applies a label style to the title, including uppercase transformation.
placeholderbooleanfalseNoIf true, displays a skeleton placeholder for the field.
avatarReact.ReactNodeundefinedNoAvatar or any additional element to be displayed on the right side of the field.

EntityFieldTitle Props

NameTypeDefaultRequiredDescription
activebooleantrueNoIf false, dims the title text.
labelbooleanfalseNoIf true, applies a label style (uppercase, lighter color) to the title.

EntityFieldDescription Props

All props from TextProps are supported.