@yarcl/react
    Preparing search index...

    Function SplitButton

    • Executes a selected action with a separate dropdown for switching actions. Choosing a menu option updates the main button without executing anything. Arrow keys navigate the menu, typing finds a choice, and Escape closes it.

      Type Parameters

      • V extends string = string

      Parameters

      Returns Element

      <SplitButton
      options={[{ value: 'draft', label: 'Save draft' }, { value: 'publish', label: 'Publish' }]}
      defaultValue="draft"
      onAction={save}
      />