Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. Import TextField from @wso2/oxygen-ui, never from @mui/material. labelPlacement is an Oxygen UI prop, and the MUI TextField ignores it.
  2. Add labelPlacement="top" to every TextField that has a label.
  3. Apply the same rule to selects (TextField select) and to the TextField in an Autocomplete's renderInput. Every TextField select also needs a placeholder whose text the developer provides; follow the oxygen-select skill for selects. Native selects (SelectProps={{ native: true }}) ignore placeholder, so use that text as the empty <option value=""> instead.
  4. Mark required fields with required; the theme draws the *.
  5. For forms (validation, sections, wizards), also follow the oxygen-form skill.

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 FormLabel above 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 through labelId, so screen readers announce it. Do not add your own aria-label when a label is set.
  • sx, className, style, fullWidth, margin and ref apply to the outer wrapper that holds the label and the field.
  • When error is 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 MUI TextField.

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".

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить oxygen-textfield с