Directives

Ecosistema completo para organización y gestión de contenido con interfaces espaciales

Directives

Overview

Directives provide specialized functionality that can be applied to HTML elements or Angular components. They are a fundamental part of the Angular ecosystem that allow you to extend the behavior of existing HTML elements.

Available Directives

Directive Description Documentation
ResponsiveWidgetProps Allows widgets to have responsive properties that change according to the breakpoint Documentation
ResponsiveDraggable Implements responsive drag functionality for widgets (moved to Widgets) Documentation

Key Features

Implementation

Directives can be implemented in standalone components using the imports property:

import { ResponsiveWidgetPropsDirective } from '@widgets-editor/shared-ui';

@Component({
  selector: 'app-my-component',
  standalone: true,
  imports: [
    // Other imports...
    ResponsiveWidgetPropsDirective
  ],
  template: `
    <div libResponsiveWidgetProps [widget]="widget" [activeBreakpoint]="activeBreakpoint">
      <!-- Component content -->
    </div>
  `
})
export class MyComponent {
  // Component code...
}

Best Practices

Migration Guide

The ResponsiveDraggable directive has been moved to the Widgets section for better organization and context. Please update your references to:

/widgets/responsive-draggable/