oxygen-form
БесплатноБез исполняемых скриптовНе проверенGenerate forms with Form.* components and validation. Use when creating input forms, multi-step wizards, or form validation. Covers field labels and…
Об этом скилле
Generate Oxygen UI Form
Instructions
- Read
.claude/oxygen-ui/components.mdfor Form.* API - Use
Form.Sectionfor grouping fields - Use
Form.Stackfor field layout - Give every field a fixed label on top with
labelPlacement="top"(see Field Labels) - Mark each required field with
required; leave optional fields unmarked - Give every select a
placeholder; ask the developer for the text (see Select and Autocomplete) - Add validation with
errorandhelperTextprops. PlainSelecthas nohelperText, so useTextField selectfor any select that shows validation messages
Critical Rules
- Import form components from
@wso2/oxygen-ui - Use controlled components with state
- Show validation errors with
errorandhelperTextprops - Use theme tokens for spacing
- Use
labelPlacement="top"on everyTextFieldin a form; never use the floating label in forms - Set
requiredon every required field; never use theoptionalprop or write "(Optional)" in a label - Write all UI text in sentence case (see below)
UI Text
Write all titles, action text, and content in sentence case. Capitalize only the first word, proper nouns, product names, and acronyms.
✓ First name ✓ Create account ✓ Enter your email address
✗ First Name ✗ Create Account ✗ ENTER YOUR EMAIL ADDRESS
- Applies to section headers, labels, placeholders, helper text, error messages, and buttons
- Write the text in sentence case in the source; never change case with
textTransform: 'uppercase'or'capitalize'
Field Labels
Forms use a fixed label above the input, not MUI's floating label. labelPlacement is an Oxygen UI prop, so import TextField from @wso2/oxygen-ui; the MUI TextField ignores it.
<TextField labelPlacement="top" label="Display name" required /> // required: label shows a themed *
<TextField labelPlacement="top" label="Description" /> // optional: no marker
Required fields
- The developer marks each required field with the
requiredprop. Nothing is required by default requireddraws a*after the label, colored by the theme, and setsrequiredon the native input, so screen readers announce it- Do not add a
*to the label text yourself, and do not color labels red; the theme handles it - Keep
requiredin sync with validation: every field the form rejects when empty isrequired, and no other field is
Optional fields
- Leave optional fields unmarked. Do not pass the
optionalprop and do not write "(Optional)" in the label, placeholder, or helper text - Do not describe a section as optional in its header or subheader; unmarked fields already read as optional
Select and Autocomplete
The same rules apply. Use TextField with select (it supports helperText for validation messages), or Select with labelPlacement="top" (see the oxygen-select skill). Every select needs a placeholder; ask the developer for the text before writing the form, listing each select with a suggestion such as "Select a role", and never invent it. Native selects ignore placeholder, so use that text as the empty option's label instead. A select in error keeps its label colour; the error shows on the border and in helperText. For Autocomplete, pass labelPlacement="top" and required to the TextField in renderInput:
<TextField select labelPlacement="top" label="Role" placeholder="Select a role" required value={role} onChange={...}>
<MenuItem value="developer">Developer</MenuItem>
</TextField>
<Autocomplete
options={countries}
renderInput={(params) => <TextField {...params} labelPlacement="top" label="Country" required />}
/>
Do and don't
✓ <TextField labelPlacement="top" label="Email" required />
✗ <TextField label="Email" required /> floating label in a form
✗ <TextField labelPlacement="top" label="Email *" /> hand-written asterisk
✗ <TextField labelPlacement="top" label="Phone" optional /> optional marker
✗ <TextField labelPlacement="top" label="Phone (Optional)" />
Basic Form
import { useState } from 'react';
import { Box, Form, TextField, Button } from '@wso2/oxygen-ui';
function BasicForm() {
const [formData, setFormData] = useState({ name: '', email: '' });
const [errors, setErrors] = useState<Record<string, string>>({});
const validate = () => {
const newErrors: Record<string, string> = {};
if (!formData.name) {
newErrors.name = 'Name is required';
}
if (!formData.email) {
newErrors.email = 'Email is required';
} else if (!/\S+@\S+\.\S+/.test(formData.email)) {
newErrors.email = 'Invalid email format';
}
setErrors(newErrors);
return Object.keys(newErrors).length === 0;
};
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
if (validate()) {
console.log('Form submitted:', formData);
}
};
return (
// noValidate lets validate
Установить oxygen-form в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл oxygen-form?
Generate forms with Form.* components and validation. Use when creating input forms, multi-step wizards, or form validation. Covers field labels and required-field marking.
Как установить скилл oxygen-form?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл oxygen-form запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic