@yoopta/ui package. These components are designed to work seamlessly with the editor and provide common functionality like toolbars, menus, and drag-and-drop interfaces.
Installation
Available Components
Selection and Toolbar
FloatingToolbar
Text selection toolbar with formatting options
SelectionBox
Visual selection box for multi-block selection
Block Actions
FloatingBlockActions
Floating actions that appear on block hover
BlockOptions
Context menu for block-level operations
Command Interface
SlashCommandMenu
Slash command menu for quick block insertion
Drag and Drop
Drag and Drop
Block reordering with drag and drop functionality
Component Architecture
All UI components follow a composable pattern using compound components:Styling
Components come with base styles via CSS files. You can:- Use default styles - Import component CSS files
- Override with custom CSS - Use className props
- Use with themes - Apply theme packages like
@yoopta/themes-shadcn
Integration with Editor
Components are designed to work as children ofYooptaEditor:
Accessibility
All components include:- Proper ARIA attributes
- Keyboard navigation support
- Focus management
- Screen reader compatibility
TypeScript Support
Full TypeScript support with exported types for all component props:Next Steps
FloatingToolbar
Build a custom text formatting toolbar
SlashCommandMenu
Create a slash command interface
Drag and Drop
Enable block reordering
Custom Components
Build your own UI components