Skip to content

Commit dc663e1

Browse files
committed
feat: add new styling and accessibility Skills (#13261)
* docs: add AI Tooling page to documentation website Surface the MCP server, llms.txt, AGENTS.md, and AI components package on the docs website so developers can discover AI-assisted development tooling. * docs: align page title with sidebar label * docs: update * docs: restructure AI docs into CLI, MCP Server, Skills - Split "AI Development" into focused pages: CLI, MCP Server, and Skills - Add CLI page for project scaffolding and component generation - Add Skills page for Agent Skills - Add AI-Ready bullet to Introduction - Add bash/json Prism highlighting - Add styling Agent Skill (SKILL.md) - Renumber sidebar and fix broken links * docs: add NEW badge to MCP Server and Skills, align sidebar badges - Add sidebar-sparkle class for highlighting new doc pages - Align NEW/EXP/DEPR component badges to consistent style - Vertically center all sidebar badges * feat: add addCustomCSS as last resort in styling skill * feat: add accessibility Agent Skill Covers accessibility APIs, label-input relationships, invisible messaging, icon modes, high contrast themes, and tooltips. * docs: fix Skills page installation instructions Remove npx skills add instructions that don't work. Skills are auto-discovered in the repo and manually copied for external projects. * docs: restore npx skills add instructions Skills are discoverable via npx skills add once the branch is merged to main. * docs: fix GitHub org references from SAP/ui5-webcomponents to UI5/webcomponents * docs: improve homepage title and meta description * docs: refine addCustomCSS guidance in styling skill * fix: pin sidebar badges to header row in expanded categories * docs: add "Ask AI" dropdown to documentation pages Adds an "Ask AI" dropdown button to all doc page headers that lets users copy page content or open it in AI tools (Claude, ChatGPT, v0, GitHub Copilot) with a pre-filled prompt about the page being viewed. Component pages include a "View source" link to the GitHub source file. * fix: align Ask AI button with page title using float right Use float:right so the button consistently aligns next to the h1 on both component pages (synthetic title) and regular doc pages (title from markdown content). Remove the Layout swizzle.
1 parent ff105f8 commit dc663e1

34 files changed

Lines changed: 1041 additions & 31 deletions

docs/04-CLI.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
sidebar_label: CLI
3+
title: CLI
4+
---
5+
6+
# CLI
7+
8+
UI5 Web Components provides command-line tools for scaffolding projects and generating components.
9+
10+
## Create a New Project
11+
12+
Scaffold a fully configured UI5 Web Components package with a single command:
13+
14+
```bash
15+
npm create @ui5/webcomponents-package
16+
```
17+
18+
This launches an interactive wizard that sets up a ready-to-run TypeScript project with a sample component, theming, i18n, and a dev server.
19+
20+
### Options
21+
22+
| Option | Description | Default |
23+
|--------|-------------|---------|
24+
| `--name` | Package name (npm-compatible, supports scopes) | `my-package` |
25+
| `--tag` | Component tag name (e.g., `my-button`) | Derived from class name |
26+
| `--testSetup` | Test setup: `cypress` or `manual` | `manual` |
27+
| `--skip` | Skip interactive prompts and use defaults | `false` |
28+
| `--skipSubfolder` | Create files in current directory instead of a subfolder | `false` |
29+
30+
### Examples
31+
32+
**Non-interactive with a custom name**
33+
34+
```bash
35+
npm create @ui5/webcomponents-package -- \
36+
--name "my-components" \
37+
--skip
38+
```
39+
40+
**Scoped package with Cypress testing**
41+
42+
```bash
43+
npm create @ui5/webcomponents-package -- \
44+
--name "@scope/my-lib" \
45+
--testSetup "cypress" \
46+
--skip
47+
```
48+
49+
### What Gets Generated
50+
51+
The scaffolded project includes:
52+
53+
- A sample **web component** (`MyFirstComponent`) with a template, styles, and i18n
54+
- **Dev server** with hot reload (`npm start`)
55+
- **Build pipeline** for production (`npm run build`)
56+
- **TypeScript** configuration
57+
- **Cypress** test setup (if selected)
58+
- **ESLint** configuration
59+
- **Theming** infrastructure (SAP Horizon)
60+
61+
After the project is created:
62+
63+
```bash
64+
cd my-package
65+
npm install
66+
npm start
67+
```
68+
69+
## Generate a Component
70+
71+
Inside a scaffolded project, generate a new web component:
72+
73+
```bash
74+
npm run create-ui5-element
75+
```
76+
77+
This prompts for a PascalCase component name (e.g., `MyButton`) and generates three files:
78+
79+
| File | Purpose |
80+
|------|---------|
81+
| `src/<Name>.ts` | Component class with `@customElement` decorator |
82+
| `src/<Name>Template.tsx` | JSX template |
83+
| `src/themes/<Name>.css` | Component styles |
84+
85+
The tag name is derived automatically — `MyButton` becomes `my-my-button` (using the prefix from `.env`).
86+
87+
You can also pass the name directly:
88+
89+
```bash
90+
npm run create-ui5-element "MyButton"
91+
```
92+
93+
After generating, import the component in `src/bundle.esm.ts`:
94+
95+
```typescript
96+
import "./MyButton.js";
97+
```
98+
99+
## Project Commands
100+
101+
Every scaffolded project comes with these commands:
102+
103+
| Command | Description |
104+
|---------|-------------|
105+
| `npm start` | Start the dev server with hot reload |
106+
| `npm run build` | Production build |
107+
| `npm run create-ui5-element` | Generate a new web component |
108+
| `npm run lint` | Lint the project |
109+
| `npm run clean` | Clean generated and build artifacts |
110+
| `npm test` | Run tests (if Cypress was selected) |
111+
112+
[View on npm](https://www.npmjs.com/package/@ui5/create-webcomponents-package) · [GitHub](https://github.com/UI5/webcomponents/tree/main/packages/create-package)

docs/05-MCP-Server.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
sidebar_label: MCP Server
3+
sidebar_class_name: sidebar-sparkle
4+
title: MCP Server
5+
---
6+
7+
# MCP Server
8+
9+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server gives your AI assistant direct access to UI5 Web Components documentation, component APIs, and integration guides — no copy-pasting needed.
10+
11+
## Setup
12+
13+
Add the following entry to your MCP client configuration (e.g. `mcp.json`):
14+
15+
```json
16+
{
17+
"mcpServers": {
18+
"@ui5/webcomponents-mcp-server": {
19+
"type": "stdio",
20+
"command": "npx",
21+
"args": ["-y", "@ui5/webcomponents-mcp-server"]
22+
}
23+
}
24+
}
25+
```
26+
27+
### One-Click Setup
28+
29+
**VS Code (GitHub Copilot)** — paste the JSON config above into your `.vscode/mcp.json`, or run:
30+
31+
```bash
32+
code --add-mcp '{"name":"@ui5/webcomponents-mcp-server","type":"stdio","command":"npx","args":["-y","@ui5/webcomponents-mcp-server"]}'
33+
```
34+
35+
**Claude Code**
36+
37+
```bash
38+
claude mcp add \
39+
--transport "stdio" \
40+
--scope "user" \
41+
"ui5-webc-mcp-server" \
42+
-- npx -y "@ui5/webcomponents-mcp-server"
43+
```
44+
45+
**Codex**
46+
47+
```bash
48+
codex mcp add \
49+
--transport "stdio" \
50+
"ui5-webc-mcp-server" \
51+
-- npx -y "@ui5/webcomponents-mcp-server"
52+
```
53+
54+
## Available Tools
55+
56+
| Tool | Description |
57+
|------|-------------|
58+
| `get_component_api` | Fetch API docs for any component — properties, slots, events, methods |
59+
| `get_guidelines` | Get integration guides for React, Angular, or vanilla JavaScript |
60+
| `list_docs` | List all available documentation with summaries |
61+
| `get_doc` | Fetch full content of a specific documentation page |
62+
63+
## Example Prompts
64+
65+
Once the MCP server is configured, try asking your AI assistant:
66+
67+
- *"Show me the API for ui5-button"*
68+
- *"How do I use UI5 Web Components with React?"*
69+
- *"Show me the available documentation"*
70+
- *"Get the theming documentation"*
71+
72+
[View on npm](https://www.npmjs.com/package/@ui5/webcomponents-mcp-server) · [GitHub](https://github.com/UI5/ui5-web-components-mcp-server)

docs/06-Skills.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
sidebar_label: Skills
3+
sidebar_class_name: sidebar-sparkle
4+
title: Skills
5+
---
6+
7+
# Skills
8+
9+
UI5 Web Components ships [Agent Skills](https://agentskills.io) — portable, structured knowledge files that teach AI coding assistants how to work with the library. Skills provide domain-specific guidance that goes beyond what a general-purpose LLM knows out of the box.
10+
11+
## Available Skills
12+
13+
| Skill | Description |
14+
|-------|-------------|
15+
| **styling** | How to customize and style UI5 Web Components — CSS shadow parts, custom states, CSS variables, and tag-level styling |
16+
| **accessibility** | How to make UI5 Web Components applications accessible — accessibility APIs, label-input relationships, invisible messaging, keyboard handling, and high contrast themes |
17+
18+
## Installation
19+
20+
Install all UI5 Web Components skills into your project:
21+
22+
```bash
23+
npx skills add "UI5/webcomponents"
24+
```
25+
26+
This downloads the skill files into your project so that AI assistants (Claude Code, Copilot, Cursor, etc.) can pick them up automatically.
27+
28+
To install a specific skill:
29+
30+
```bash
31+
npx skills add "UI5/webcomponents" --skill "styling"
32+
```
33+
34+
### In the Repository
35+
36+
When working inside the UI5 Web Components repository, AI coding assistants automatically discover and use the skills from the [`skills/`](https://github.com/UI5/webcomponents/tree/main/skills) directory — no setup needed.
37+
38+
### Manual Setup
39+
40+
You can also copy skills directly from the repository's [`skills/`](https://github.com/UI5/webcomponents/tree/main/skills) directory into your project's `.agents/skills/` folder:
41+
42+
```
43+
your-project/
44+
└── .agents/
45+
└── skills/
46+
├── styling/
47+
│ └── SKILL.md
48+
└── accessibility/
49+
└── SKILL.md
50+
```
51+
52+
## How Skills Work
53+
54+
Each skill is a Markdown file (`SKILL.md`) with structured frontmatter (name, description, trigger conditions) and a body containing the actual guidance. When an AI assistant encounters a relevant task — for example, a question about styling a component — it uses the skill's content to provide accurate, project-specific answers instead of generic advice.
55+
56+
Skills are part of the open [Agent Skills](https://agentskills.io) standard and work across AI tools that support it.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)