angular-cdk-integration
БесплатноБез исполняемых скриптовНе проверенCreate components using Angular CDK utilities including drag-drop, overlay, portal, scrolling, a11y, clipboard, and platform detection for ng-events project
Об этом скилле
Angular CDK Integration Skill
This skill guides the creation of components and features using Angular CDK (@angular/cdk) utilities in the ng-events construction site management system.
When to Use This Skill
Triggers: "Angular CDK", "drag and drop", "overlay", "portal", "virtual scroll", "accessibility", "clipboard", "platform detection", "CDK utilities"
Use this skill when:
- Implementing drag-and-drop functionality
- Creating overlays, tooltips, or popovers
- Building virtual scrolling lists
- Managing focus and accessibility
- Detecting platform/browser capabilities
- Working with clipboard operations
- Managing scrolling behavior
Core CDK Modules
1. Drag and Drop (@angular/cdk/drag-drop)
Purpose: Create draggable elements and drop zones
import { Component } from '@angular/core';
import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common';
import { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
@Component({
selector: 'app-task-board',
standalone: true,
imports: [CommonModule, CdkDropList, CdkDrag],
template: `
<div class="task-board">
<div class="column" cdkDropList #todoList="cdkDropList"
[cdkDropListData]="todo"
[cdkDropListConnectedTo]="[inProgressList, doneList]"
(cdkDropListDropped)="drop($event)">
<h3>To Do</h3>
@for (task of todo; track task.id) {
<div cdkDrag class="task-card">
{{ task.title }}
<div *cdkDragPlaceholder class="drag-placeholder"></div>
</div>
}
</div>
<div class="column" cdkDropList #inProgressList="cdkDropList"
[cdkDropListData]="inProgress"
[cdkDropListConnectedTo]="[todoList, doneList]"
(cdkDropListDropped)="drop($event)">
<h3>In Progress</h3>
@for (task of inProgress; track task.id) {
<div cdkDrag class="task-card">{{ task.title }}</div>
}
</div>
<div class="column" cdkDropList #doneList="cdkDropList"
[cdkDropListData]="done"
[cdkDropListConnectedTo]="[todoList, inProgressList]"
(cdkDropListDropped)="drop($event)">
<h3>Done</h3>
@for (task of done; track task.id) {
<div cdkDrag class="task-card">{{ task.title }}</div>
}
</div>
</div>
`,
styles: [`
.task-board {
display: flex;
gap: 20px;
}
.column {
flex: 1;
min-height: 400px;
background: #f5f5f5;
padding: 16px;
border-radius: 4px;
}
.task-card {
background: white;
padding: 12px;
margin-bottom: 8px;
border-radius: 4px;
cursor: move;
}
.task-card:active {
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2);
}
.drag-placeholder {
background: #ccc;
border: dotted 2px #999;
height: 40px;
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}
`]
})
export class TaskBoardComponent {
todo = [
{ id: '1', title: 'Task 1' },
{ id: '2', title: 'Task 2' }
];
inProgress = [
{ id: '3', title: 'Task 3' }
];
done = [
{ id: '4', title: 'Task 4' }
];
drop(event: CdkDragDrop<Task[]>) {
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
}
}
}
2. Overlay (@angular/cdk/overlay)
Purpose: Create floating panels and popups
import { Component, inject } from '@angular/core';
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
import { ComponentPortal } from '@angular/cdk/portal';
@Component({
selector: 'app-menu-trigger',
standalone: true,
template: `
<button (click)="openMenu()">Open Menu</button>
`
})
export class MenuTriggerComponent {
private overlay = inject(Overlay);
private overlayRef: OverlayRef | null = null;
openMenu(): void {
if (this.overlayRef) {
this.overlayRef.dispose();
this.overlayRef = null;
return;
}
const positionStrategy = this.overlay
.position()
.flexibleConnectedTo(this.elementRef)
.withPositions([
{
originX: 'start',
originY: 'bottom',
overlayX: 'start',
overlayY: 'top'
}
]);
this.overlayRef = this.overlay.create({
positionStrategy,
scrollStrategy: this.overlay.scrollStrategies.reposition(),
hasBackdrop: true,
backdropClass: 'cdk-overlay-transparent-backdrop'
});
const menuPortal = new ComponentPortal(MenuComponent);
this.overlayRef.attach(menuPortal);
// Close on backdrop click
this.overlayRef.backdropClick().subscribe(
Установить angular-cdk-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл angular-cdk-integration?
Create components using Angular CDK utilities including drag-drop, overlay, portal, scrolling, a11y, clipboard, and platform detection for ng-events project
Как установить скилл angular-cdk-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-cdk-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic