Skip to main content
The content type system provides a flexible way to define structured content for detail views in React Native Beagle. Each content type has a unique kind field that identifies its type.

Core Content Types

Displays plain or formatted text.
'text'
required
Identifies this as a text content type.
string
required
The text content to display.
TypographyVariant
Typography variant for styling the text.
boolean
Whether to render the text in bold.
boolean
Whether the text can be selected by the user.
number
Maximum number of lines to display before truncating.
Displays JSON data in a formatted, expandable view.
'json'
required
Identifies this as a JSON content type.
Record<string, any>
required
The JSON data object to display.
boolean
Whether the JSON view should be expanded by default.
Displays a label-value pair.
'label'
required
Identifies this as a label content type.
string
required
The label text (typically shown on the left).
string
required
The value text (typically shown on the right).
Displays a loading indicator with optional label.
'loading'
required
Identifies this as a loading content type.
string
Optional text to display alongside the loading indicator.
number
Size of the loading indicator in pixels.

Layout Content Types

Groups content under an expandable section with a title.
'section'
required
Identifies this as a section content type.
string
required
Unique identifier for this section.
string
required
The section header title.
boolean
Whether the section should be expanded by default.
Content[]
required
Array of content items within this section.
Container for laying out content in rows or columns.
'box'
required
Identifies this as a box content type.
string
required
Unique identifier for this box.
'row' | 'column'
Layout direction for children (defaults to column).
'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around'
How to distribute space along the main axis.
Content[]
required
Array of content items within this box.
Container for a list of content items, optionally including sections.
'list'
required
Identifies this as a list content type.
string
required
Unique identifier for this list.
(Content | SectionContent)[]
required
Array of content items or sections within this list.

Tab Navigation Types

Defines a single tab with its content.
string
required
The tab label displayed in the tab bar.
ListContent
required
The content to display when this tab is active.
Creates a tabbed interface with multiple tabs.
'tab-bar'
required
Identifies this as a tab bar content type.
Tab[]
required
Array of tabs to display in the tab bar.

Union Types

Content

The base union type for simple content items:

DetailContent

Union type for top-level detail view content:
This type represents the root content that can be returned from detail providers. It supports either a simple list or a tabbed interface.

Type Relationships

Example Usage