Skip to main content
Beagle uses a flexible content system to display log details. Each content type serves a specific purpose and can be combined to create rich, informative detail views.

Available Content Types

Beagle provides eight content types, each with unique properties and use cases:

Text

Displays text with optional formatting options.

JSON

Displays JSON data in an interactive, collapsible tree view.
Example from NetworkingLogPlugin:
JSON content automatically handles nested objects and arrays, providing an interactive exploration experience.

Label

Displays a label-value pair, perfect for key-value data.
Example from NetworkingLogPlugin:

Loading

Displays a loading indicator for pending operations.
Example from NetworkingLogPlugin:

Section

Groups related content under a collapsible header.
Example from NetworkingLogPlugin:

Box

Arranges content in a horizontal or vertical layout with flexible positioning.
Example from NetworkingLogPlugin:

List

Displays a vertical list of content items.
Example from ErrorLogPlugin:

Tab Bar

Displays multiple tabs, each containing a list of content.
Example from NetworkingLogPlugin:

When to Use Each Type

1

Text

Use for:
  • Simple messages
  • Headers and titles
  • Stack traces
  • Any string content that needs formatting
2

JSON

Use for:
  • Request/response bodies
  • Configuration objects
  • Event parameters
  • Any structured data
3

Label

Use for:
  • Key-value pairs
  • Metadata (URL, status, duration)
  • Object properties
  • Configuration values
4

Loading

Use for:
  • Pending network requests
  • Async operations in progress
  • Loading states
5

Section

Use for:
  • Grouping related content
  • Collapsible headers/bodies
  • Organizing large detail views
6

Box

Use for:
  • Horizontal layouts (e.g., footer with left and right content)
  • Custom spacing and alignment
  • Flexible positioning
7

List

Use for:
  • Vertical content arrangement
  • Main container for detail views
  • Combining multiple content types
8

Tab Bar

Use for:
  • Multiple related views (Info, Request, Response)
  • Organizing large amounts of data
  • Different aspects of the same log

Building Detail Views: Real Examples

Here are complete examples from Beagle’s built-in plugins:

Best Practices

Combine content types to create rich, informative views. Use sections to organize, labels for metadata, JSON for data, and text for messages.
Always provide a unique key for section, box, list, and tab-bar content types. This ensures proper React rendering and state management.
Don’t nest tab bars. The tab-bar type should only appear at the root level of provideDetailContent.

Content Composition Tips

  1. Start with the container: Choose between list (single view) or tab-bar (multiple views)
  2. Group with sections: Use sections to organize related content under collapsible headers
  3. Label metadata first: Put key-value pairs at the top for quick scanning
  4. JSON for complex data: Use JSON content for nested objects and arrays
  5. Text for messages: Use text content for strings, with appropriate formatting
  6. Loading for pending: Show loading states for async operations