Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问clear审计未展示

angular-material-v20Angular material V20 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

198

周安装

8

GitHub Stars

公开资料未说明

下载量

62
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:angular-material-v20(Angular material V20 前端)
来源仓库:https://github.com/7spade/black-tortoise
仓库路径:skills/angular-material-v20
安装命令:
npx skills add https://github.com/7spade/black-tortoise --skill angular-material-v20
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/7spade/black-tortoise --skill angular-material-v20

简介

Angular 20+ 官方 Material Design 组件库集成支持。

  • 涵盖表单控件、导航布局、数据表格及弹窗通知等 UI 元素。
  • 提供主题定制与 WCAG 可访问性优化指导。
  • 安装命令:npx skills add https://github.com/7spade/black-tortoise --skill angular-material-v20。
  • 注意组件样式需与现有设计系统保持一致。

SKILL.md

Angular Material v20 Skill

Rules

Installation

  • Use ng add @angular/material for automatic setup
  • Must install @angular/material@~20.0.0 and @angular/cdk@~20.0.0 together

Component Imports

  • Import specific component modules (e.g., MatDialogModule, MatFormFieldModule)
  • Use standalone components with explicit imports array
  • NEVER import entire Material library

Theming

  • Use @use '@angular/material' as mat; syntax
  • Include mat.core() before theme definitions
  • Define theme with mat.define-light-theme() or mat.define-dark-theme()
  • Include mat.all-component-themes($theme) to apply theme

Form Fields

  • Wrap matInput elements in <mat-form-field>
  • Use appearance attribute: outline, fill, or standard
  • Include <mat-label> for accessibility
  • Show errors with <mat-error> when field is invalid and touched

Dialog Usage

  • Inject MatDialog service
  • Use dialog.open(Component, config) to open dialogs
  • Configure dialog with width, data, and other options
  • Access dialog data via MAT_DIALOG_DATA injection token

Accessibility

  • Follow ARIA guidelines for all components
  • Include aria-labels where text content is not visible
  • Ensure keyboard navigation works for all interactive elements

Change Detection

  • Use OnPush change detection strategy
  • Leverage signals for reactive state management

Performance

  • Lazy load Material modules when possible
  • Import only required component modules
  • Use virtual scrolling for large lists with cdk-virtual-scroll-viewport

Context

Summary

Angular Material v20 is the official Material Design component library for Angular 20+ applications, providing pre-built UI components with theming support and accessibility features.

When to Use This Skill

Activate this skill when you need to:

  • Implement Material Design components in Angular applications
  • Set up or customize Material theming
  • Work with form controls (inputs, selects, checkboxes, datepickers)
  • Create navigation components (toolbar, sidenav, menu, tabs)
  • Build layouts with cards, expansion panels, steppers
  • Display data in tables with sorting and pagination
  • Show dialogs, snackbars, tooltips, or bottom sheets
  • Ensure WCAG accessibility compliance
  • Optimize Material component performance

Core Components

Form Controls

  • MatInput - Text input fields
  • MatSelect - Dropdown selection
  • MatCheckbox - Checkbox inputs
  • MatRadioButton - Radio button groups
  • MatSlideToggle - Toggle switches
  • MatSlider - Slider inputs
  • MatDatepicker - Date selection

Navigation

  • MatToolbar - Top navigation bar
  • MatSidenav - Side navigation drawer
  • MatMenu - Dropdown menus
  • MatTabs - Tabbed navigation

Layout

  • MatCard - Card containers
  • MatDivider - Visual separators
  • MatExpansionPanel - Collapsible panels
  • MatGridList - Grid layouts
  • MatList - List displays
  • MatStepper - Step-by-step workflows

Buttons & Indicators

  • MatButton - Button variants
  • MatButtonToggle - Toggle button groups
  • MatBadge - Notification badges
  • MatChip - Chip elements
  • MatIcon - Icon display
  • MatProgressBar - Linear progress
  • MatProgressSpinner - Circular progress

Popups & Modals

  • MatDialog - Modal dialogs
  • MatSnackBar - Toast notifications
  • MatTooltip - Hover tooltips
  • MatBottomSheet - Bottom sheet modals

Data Tables

  • MatTable - Data table display
  • MatSort - Column sorting
  • MatPaginator - Table pagination

Theming Example

// styles.scss
@use '@angular/material' as mat;

@include mat.core();

$my-primary: mat.define-palette(mat.$indigo-palette);
$my-accent: mat.define-palette(mat.$pink-palette);
$my-warn: mat.define-palette(mat.$red-palette);

$my-theme: mat.define-light-theme((
  color: (
    primary: $my-primary,
    accent: $my-accent,
    warn: $my-warn,
  )
));

@include mat.all-component-themes($my-theme);

Dialog Example

import { Component, inject } from '@angular/core';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';

@Component({
  selector: 'app-example',
  standalone: true,
  imports: [MatDialogModule],
  template: `
    <button mat-raised-button (click)="openDialog()">
      Open Dialog
    </button>
  `
})
export class ExampleComponent {
  dialog = inject(MatDialog);

  openDialog() {
    this.dialog.open(MyDialogComponent, {
      width: '400px',
      data: { name: 'Example' }
    });
  }
}

Form Field Example

import { Component } from '@angular/core';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { ReactiveFormsModule } from '@angular/forms';

@Component({
  selector: 'app-form',
  standalone: true,
  imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule],
  template: `
    <mat-form-field appearance="outline">
      <mat-label>Email</mat-label>
      <input matInput [formControl]="email" />
      <mat-error *ngIf="email.hasError('required')">
        Email is required
      </mat-error>
    </mat-form-field>
  `
})
export class FormComponent {
  email = new FormControl('', Validators.required);
}

Best Practices

  1. Import modules - Import specific component modules for better tree-shaking
  2. Use theming - Leverage Material's theming system for consistent styling
  3. Accessibility - Follow ARIA guidelines and ensure keyboard navigation
  4. OnPush - Use OnPush change detection with signals for better performance
  5. Lazy loading - Lazy load Material modules where possible to reduce initial bundle size

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

27.97%
按下载量换算17

OpenCode

20.75%
按下载量换算13

Claude Code

18.73%
按下载量换算12

Codex

12.83%
按下载量换算8

Gemini CLI

8.03%
按下载量换算5

Cursor

3.73%
按下载量换算2

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills