← All @molecule/* packages · App templates
@molecule/app-info-display-reactFeature · info-display · App (browser) · v1.0.1 · Apache-2.0
InfoCard and DefinitionList for structured label/value metadata display
npm install @molecule/app-info-display-react@molecule/app-info-display-react is a ready-made info-display feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { InfoCard, DefinitionList } from '@molecule/app-info-display-react'
;<InfoCard
title="Company Details"
fields={[
{ label: 'Industry', value: 'Technology' },
{ label: 'Founded', value: '2018' },
{ label: 'Employees', value: '120–150' },
]}
columns={2}
dataMolId="company-info-card"
/>Works with: @molecule/app-react, @molecule/app-ui, @molecule/app-ui-react
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
React InfoCard and DefinitionList for structured label/value metadata.
Exports:
<InfoCard> — Card-wrapped DefinitionList with title, icon, actions.<DefinitionList> — standalone label/value grid.DefinitionField type.import { InfoCard, DefinitionList } from '@molecule/app-info-display-react'
;<InfoCard
title="Company Details"
fields={[
{ label: 'Industry', value: 'Technology' },
{ label: 'Founded', value: '2018' },
{ label: 'Employees', value: '120–150' },
]}
columns={2}
dataMolId="company-info-card"
/>
feature
npm install @molecule/app-info-display-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react
DefinitionFieldA single label/value pair rendered inside a DefinitionList.
interface DefinitionField {
/** Label text (usually `t('...')`). */
label: ReactNode
/** Rendered value. */
value: ReactNode
/** Optional icon rendered to the left of the label. */
icon?: ReactNode
}
DefinitionListPropsProps for {@link DefinitionList}.
interface DefinitionListProps {
/** Fields to render. */
fields: DefinitionField[]
/** Grid column count. */
columns?: 1 | 2 | 3
/** Extra classes. */
className?: string
}
InfoCardPropsProps for {@link InfoCard}.
interface InfoCardProps {
/** Card heading. */
title: ReactNode
/** Optional leading icon. */
icon?: ReactNode
/** Optional right-side header actions (edit button, overflow menu). */
actions?: ReactNode
/** Structured fields to display. */
fields: DefinitionField[]
/** Grid column count — `1` stacks labels above values, `2+` puts labels beside values. */
columns?: 1 | 2 | 3
/** Extra classes on the outer Card. */
className?: string
/** `data-mol-id` for AI-agent selectors. */
dataMolId?: string
}
DefinitionList(props)Structured label/value pair list. Use standalone or inside
<InfoCard>. Apps pass already-formatted values (dates, currency,
status pills, etc.) as ReactNodes.
function DefinitionList({ fields, columns = 1, className }: DefinitionListProps): JSX.Element
props — Component props (see {@link DefinitionListProps}).InfoCard(props)Card wrapping a <DefinitionList> of metadata fields.
Used all over CRM/helpdesk/finance detail pages (CompanyInfoCard, DealInfoCard, TicketDetailsCard, TransactionDetailsCard) — same shape everywhere, only the fields differ.
function InfoCard({
title,
icon,
actions,
fields,
columns = 1,
className,
dataMolId,
}: InfoCardProps): JSX.Element
props — Component props (see {@link InfoCardProps}).Peer dependencies:
@molecule/app-react ^1.0.1@molecule/app-ui ^1.0.1@molecule/app-ui-react ^1.0.1react ^18.0.0 || ^19.0.0@molecule/app-react@molecule/app-ui@molecule/app-ui-reactreactPurely presentational: pass already-formatted / already-translated
ReactNodes as labels and values. getClassMap() requires a bonded
ClassMap (e.g. @molecule/app-ui-tailwind) — there is no other wiring.
columns={1} stacks label above value; 2/3 arrange fields in a grid.