Basic Usage
Anatomy
Examples
Complete Control Panel
Full-featured control panel with all available controls.Minimal Controls
Simple control setup with just playback buttons.Custom Styling
Apply custom styling to control components.With Orderbook Integration
Integrate controls directly with the Orderbook component.Only Timeline
Display just the timeline scrubber without buttons.With Settings
Combine controls with settings panel.Components
Root
Wrapper component that provides context for all control elements.LiveBadge
Indicator showing whether the orderbook is displaying live data or historical replay.- LIVE badge when showing real-time data
- REPLAY badge when in historical playback mode
PlaybackButtons
Control buttons for playback navigation.- Play/Pause toggle
- Step backward (previous frame)
- Step forward (next frame)
- Return to live mode
Timeline
Interactive timeline slider for scrubbing through historical data.- Drag to scrub through history
- Click to jump to specific point
- Visual representation of current position
- Timestamp display
Toolbar
Container for organizing multiple control elements in a horizontal layout.Props
Root
ReactNode
required
Control components to render.
string
Additional CSS classes for styling.
LiveBadge
string
Additional CSS classes for styling the badge.
PlaybackButtons
string
Additional CSS classes for styling the button group.
Timeline
string
Additional CSS classes for styling the timeline.
Toolbar
ReactNode
required
Control components to display in the toolbar.
string
Additional CSS classes for styling the toolbar.
Playback Behavior
The controls automatically manage orderbook playback state:- Live Mode: Default state showing real-time data
- Replay Mode: Activated when interacting with timeline or playback buttons
- Auto-resume: Optionally return to live mode after reaching the end of historical data
Notes
OrderbookControls must be used within an
OrderbookProvider or Orderbook.RootProvider context to function properly.
