Aquila – Angular Brand Kit コンポーネントライブラリ
Aquila(オープンソース)/ Angular Brand Kit(旧称 NDBX)は Allianz デザインシステムの
Angular コンポーネントライブラリです。Angular v19+ の最新パターン(スタンドアロンコンポーネント、シグナル、新しい制御フロー @if、@for、inject() など)を使用してください。
インポートルール
Aquila コンポーネントはスタンドアロンです。コンポーネントを直接インポートします:
import { NxButtonComponent } from '@allianz/ng-aquila/button';
import { NxFormfieldComponent } from '@allianz/ng-aquila/formfield';
import { NxInputDirective } from '@allianz/ng-aquila/input';
@Component({
imports: [NxButtonComponent, NxFormfieldComponent, NxInputDirective],
})
インポートパスのパターン:@allianz/ng-aquila/{component-name}
Aquila 固有のルール
NxInputDirectiveは<input nxInput>を<nx-formfield>でラップせずに使用しないでください。- フォームフィールド内のバリデーションメッセージには
<nx-error nxFormfieldError>を使用します。 - 誤ったフォーム送信を防ぐため、
<button nxButton>には常にtype="button"を設定します。 - Aquila フォームコンポーネントではリアクティブフォームを推奨します。
- インラインCSSスタイルは使用せず、Aquila の組み込みスタイリングに依存してください。
フォームフィールドとバリデーション(リアクティブフォーム)
<form [formGroup]="form">
<nx-formfield label="メールアドレス">
<input nxInput formControlName="email" type="email" />
@if (form.controls.email.errors) {
<nx-error nxFormfieldError>有効なメールアドレスを入力してください</nx-error>
}
</nx-formfield>
</form>
ドロップダウン
<nx-formfield label="国">
<nx-dropdown formControlName="country">
<nx-dropdown-item value="DE">ドイツ</nx-dropdown-item>
<nx-dropdown-item value="CH">スイス</nx-dropdown-item>
<nx-dropdown-item value="AT">オーストリア</nx-dropdown-item>
</nx-dropdown>
</nx-formfield>
モーダルダイアログ
import { NxDialogService } from '@allianz/ng-aquila/modal';
const modalRef = inject(NxDialogService).open(MyDialogComponent);
modalRef.afterClosed().subscribe(result => { /* 結果を処理 */ });
グリッドシステム
12カラムのレスポンシブグリッド。nxCol には、tiny, small, medium, large, xlarge, 2xlarge, 3xlarge の順に最大7個のブレークポイント値をカンマ区切りで指定できます。
7個未満の値を指定した場合、最後の値が残りのブレークポイントに繰り返し適用されます
(例:nxCol="12,8" → 12,8,8,8,8,8,8)。
<div nxLayout="grid">
<div nxRow>
<div nxCol="12,12,6">左</div>
<div nxCol="12,12,6">右</div>
</div>
</div>
よく使われるコンポーネント
| コンポーネント | セレクタ |
|---|---|
| formfield | nx-formfield |
| input | input[nxInput] |
| button | button[nxButton] |
| icon | nx-icon |
| dropdown | nx-dropdown |
| checkbox | nx-checkbox |
| grid | [nxLayout] |
| headline | [nxHeadline] |
| copytext | [nxCopytext] |
| link | nx-link |
| accordion | nx-accordion |
| popover | [nxPopoverTriggerFor] |
| badge | nx-badge |
| datefield | input[nxDatefield] |
| modal | nx-modal |
| message | nx-message |
| data-display | nx-data-display |
| table | [nxHeaderCell] |
| tabs | nx-tab |
| list | ul[nxList] |
| radio-toggle | nx-radio-toggle |
| tooltip | [nxTooltip] |
| switcher | nx-switcher |
| spinner | nx-spinner |
| pagination | nx-pagination |
ユースケース別コンポーネント検索
- フォーム: autocomplete, checkbox, circle-toggle, code-input, datefield, dropdown, file-uploader, formfield, input, natural-language-form, phone-input, radio-toggle, rating, slider, switcher, timefield
- ナビゲーション: breadcrumb, header, menu, tabs, pagination
- テーブル: comparison-table, dynamic-table, table
- フィードバック: badge, indicator, message, modal, notification-panel, progress-stepper, progressbar, spinner, tooltip
- レイアウト: accordion, card, footer, grid, sidepanel, small-stage, toolbar
- オーバーレイ: modal, overlay, popover
- メディア: avatar, icon, image, video
- インタラクション: action, button, link, page-search, signal-button
- 選択: checkbox, circle-toggle, dropdown, radio-toggle, taglist
詳細API
コンポーネントの完全なAPI(入力、出力、メソッド)については、プロジェクトにインストールされているパッケージ内のコンポーネンドキュメントを参照してください:
通常は node_modules/@allianz/ng-aquila/mcp/generated/components/{component-name}.md またはプロジェクト設定に応じた類似のパスにあります。
フォールバック:**/mcp/generated/**/ でglob検索を実行してください。