Skip to main content

Overview

BlockOptions is compound component for block context menus. It supports controlled/uncontrolled modes, Floating UI positioning, and integrates seamlessly with other UI components.
Block options menu example

Features

  • API — controlled/uncontrolled with open/onOpenChange
  • Compound components — Root, Content, Trigger, Item, Group, Separator
  • Floating positioning — automatic positioning via Floating UI
  • Helper hookuseBlockActions for common operations

Installation

Basic Usage

API Reference

BlockOptions (Root)

Root component that manages open state and context.
Props:

BlockOptions.Trigger

Optional trigger button (for uncontrolled usage).
Props:

BlockOptions.Content

Floating content panel.
Props:

BlockOptions.Item

Menu item button.
Props:

BlockOptions.Group

Groups items together.

BlockOptions.Separator

Visual separator between groups.

useBlockActions()

Helper hook with common block operations.

Examples

With ActionMenuList (Turn Into)

Uncontrolled with Trigger

Styling

CSS Variables

Best Practices

FloatingBlockActions

Trigger BlockOptions from drag handle

ActionMenuList

Open from BlockOptions for “Turn into”