Installation / インストール
1. Clone the repository:
git clone https://github.com/aqz-saito/astro.aqz.jp.git
2. Copy the component to your project:
components/
└── PlantUML.astro
3. Install dependencies:
npm install plantuml-encoder @types/plantuml-encoder
4. Import and use:
import PlantUML from '@/components/PlantUML.astro';
Usage / 使い方
---import PlantUML from "../components/PlantUML.astro";---
<PlantUML diagram="@startumlAlice -> Bob: Hello@enduml "/>
Examples / 使用例
Sequence Diagram / シーケンス図
Component Diagram / コンポーネント図
Props / プロパティ
Name | Type | Default | Description |
---|---|---|---|
diagram | string | Required | PlantUML diagram text PlantUML図の定義テキスト |
className | string | "w-full max-w-4xl mx-auto" | CSS classes for the img element img要素のCSSクラス |
Notes / 注意事項
-
Requires internet connection (uses public PlantUML server)
インターネット接続が必要です(公開PlantUMLサーバーを使用) -
SVG output for crisp rendering
SVG出力でクリアな描画を実現 -
Simple API with TypeScript support
TypeScriptサポート付きのシンプルなAPI