oxygen-textfield
БесплатноБез исполняемых скриптовНе проверенUse the Oxygen UI TextField with a fixed label above the field instead of MUI's floating label. Use when adding or editing any TextField, select, or…
от wso2★ 67 звёзд на GitHubОб этом скилле
Fixed-Label TextField
Oxygen UI text inputs use a fixed label that sits above the field and never moves. Do not use MUI's floating label, which starts inside the field and shrinks into the border on focus.
Fixed label (use) Floating label (don't use)
Display name ┌─ Display name ──────┐
┌─────────────────────┐ │ my-app │
│ my-app │ └─────────────────────┘
└─────────────────────┘
Instructions
- Import
TextFieldfrom@wso2/oxygen-ui, never from@mui/material.labelPlacementis an Oxygen UI prop, and the MUITextFieldignores it. - Add
labelPlacement="top"to everyTextFieldthat has alabel. - Apply the same rule to selects (
TextField select) and to theTextFieldin an Autocomplete'srenderInput. EveryTextField selectalso needs aplaceholderwhose text the developer provides; follow theoxygen-selectskill for selects. Native selects (SelectProps={{ native: true }}) ignoreplaceholder, so use that text as the empty<option value="">instead. - Mark required fields with
required; the theme draws the*. - For forms (validation, sections, wizards), also follow the
oxygen-formskill.
Usage
import { TextField, MenuItem, Autocomplete } from '@wso2/oxygen-ui';
<TextField labelPlacement="top" label="Display name" required />
<TextField select labelPlacement="top" label="Environment" placeholder="Select an environment" value={env} onChange={(e) => setEnv(e.target.value)}>
<MenuItem value="dev">Development</MenuItem>
<MenuItem value="prod">Production</MenuItem>
</TextField>
<Autocomplete
options={regions}
renderInput={(params) => <TextField {...params} labelPlacement="top" label="Region" />}
/>
How it behaves
- The label renders as a
FormLabelabove the input and keeps its colour on focus. Focus shows only on the field's border. - The label is linked to the input with
htmlFor, and for selects throughlabelId, so screen readers announce it. Do not add your ownaria-labelwhen a label is set. sx,className,style,fullWidth,marginandrefapply to the outer wrapper that holds the label and the field.- When
erroris set, an empty helper line is reserved so the layout doesn't shift when a message appears. - Without a
label, the prop has no effect and the field renders as a plain MUITextField.
Fields with no visible label
Some fields have no visible label, such as a search box in a toolbar or a table filter. Omit label, describe the field with a placeholder, and give it an accessible name:
<TextField
placeholder="Search projects"
slotProps={{ htmlInput: { 'aria-label': 'Search projects' } }}
/>
Never use a floating label to save vertical space.
Converting floating labels
When you edit code that uses floating labels:
| Floating-label code | Fixed-label replacement |
|---|---|
import { TextField } from '@mui/material' |
import { TextField } from '@wso2/oxygen-ui' |
<TextField label="Name" /> |
<TextField labelPlacement="top" label="Name" /> |
InputLabelProps={{ shrink: true }} or slotProps={{ inputLabel: { shrink: true } }} |
Remove it; add labelPlacement="top" |
<FormControl><InputLabel>Role</InputLabel><Select label="Role"> |
<Select labelPlacement="top" label="Role" placeholder="Select a role"> or <TextField select labelPlacement="top" label="Role" placeholder="Select a role">, with placeholder text from the developer (see oxygen-select) |
A Typography or FormLabel placed above a label-less TextField |
Remove it; pass the text as label with labelPlacement="top" |
label="Email *" |
label="Email" required |
Do and don't
✓ <TextField labelPlacement="top" label="Email" required />
✓ <TextField select labelPlacement="top" label="Role" placeholder="Select a role">…</TextField>
✗ <TextField label="Email" /> floating label
✗ import { TextField } from '@mui/material' labelPlacement is ignored
✗ <TextField label="Email" slotProps={{ inputLabel: { shrink: true } }} />
✗ <InputLabel>Role</InputLabel><Select label="Role"> floating select label
✗ <Typography>Email</Typography><TextField /> label not linked to the input
✗ <TextField labelPlacement="top" label="Email *" /> hand-written asterisk
Write labels in sentence case, for example "Display name", not "Display Name".
Установить oxygen-textfield в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл oxygen-textfield?
Use the Oxygen UI TextField with a fixed label above the field instead of MUI's floating label. Use when adding or editing any TextField, select, or Autocomplete input, or when converting floating-label fields to fixed labels.
Как установить скилл oxygen-textfield?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл oxygen-textfield запускает скрипты?
Нет, скилл состоит только из инструкций (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