Command Palette

Search for a command to run...

Docs
Action Hub Input

Action Hub Input

A versatile input field with customizable action buttons and status indicators

Loading...

Installation

Props

PropTypeDefaultDescription
labelstring"Action Input"The label for the input field
placeholderstring"Type command, email, or snippet..."Placeholder text
typestring"text"Input type
defaultValuestring""Default input value
validate(value: string) => string | nullundefinedCustom validation function
actionsActionHubInputAction[][]Array of action buttons
historyEnabledbooleantrueEnable input history tracking

Action Interface

interface ActionHubInputAction {
  icon: JSX.Element;
  onClick: (value: string) => Promise<void> | void;
  tooltip?: string;
  showOnEmpty?: boolean;
}

Features

  • Customizable Actions: Add any number of action buttons with custom icons and behaviors
  • Status Indicators: Visual feedback for loading, success, and error states
  • Input History: Tracks and suggests previously entered values
  • Async Support: Handles both synchronous and asynchronous action functions
  • Conditional Display: Actions can be shown/hidden based on input state
  • Validation Support: Built-in validation with error display