--- name: apps-ui-kit description: Build React 19 screens with the ONLYOFFICE UI kit (@onlyoffice/apps-ui-kit) in your own web app — forms, dialogs, side panels, lists, empty states, toasts, theming and translations. Use when someone wants their app to look like ONLYOFFICE DocSpace or Apps ("a dialog in the DocSpace style", "a settings form like the portal's", "use the DocSpace components in our admin") even if they never name the kit; when they ask which kit component fits a job or what a prop is called (visible vs isVisible vs isOpen vs open); when kit components render unstyled, with empty labels, an i18n console error, a collapsed toggle, a 1px textarea or doubled spacing; when an import from the kit does not resolve or pulls in portal-only modules (selectors, billing, uploader); or when reviewing code that uses the kit. Not for plugins inside the DocSpace portal (apps-plugin-sdk), for embedding DocSpace in an iframe (apps-embed-sdk), or for other component libraries. license: Apache-2.0 metadata: author: ONLYOFFICE sdk-version: "4.0.1" --- # ONLYOFFICE UI kit The component library ONLYOFFICE DocSpace and ONLYOFFICE Apps are built from, used from your own React application: `@onlyoffice/apps-ui-kit`. It fails quietly: a wrong prop name is ignored, a missing provider empties every label, and nothing is logged. ## Pinned facts - `@onlyoffice/apps-ui-kit` **4.0.1** from npm, ESM only, React 19. Four required peers: `react`, `react-dom`, `i18next` (^25.5.2), `react-i18next` (^15.7.3); fifteen more are optional and belong to the portal-internal modules. - **Each module imports its own CSS.** Nothing is imported by hand; `@onlyoffice/apps-ui-kit/styles.css` is the whole library, ~730 KB, for builds that cannot follow those imports. - 98 components, each with a README of its own inside the package; the root barrel carries every one by name, and still is not the way in — see rule 6. Two providers, both mounted by the application: `ThemeProvider` from `providers/theme`, `TranslationProvider` from `providers/translation`. ## Step 0 — find out what you are working against 1. Read `node_modules/@onlyoffice/apps-ui-kit/package.json` and compare its `version` with the one pinned above. Say in your answer which version you read. 2. Not installed? `npm install @onlyoffice/apps-ui-kit`, then read the version it brought; if you cannot install, answer from the component's page on the docs site (2 below) and name it. 3. A **DocSpace portal plugin** (`@onlyoffice/docspace-plugin-sdk` in `package.json`) is the `apps-plugin-sdk` skill's job: the portal decides how a plugin gets the kit, so load that skill — it says which rules below still hold in a plugin (most do). ## Sources, and which one wins When two disagree, the higher one wins — say so instead of switching between them. 1. **The installed package.** `components//README.md` is the component's own page, faults included; `docs/components.md` the catalogue — the close calls, and the prop that shows and hides each component; `docs/getting-started.md` and `docs/public-api.md` the setup and the public boundary; `dist/types/**/*.d.ts` the exact props. It describes the version the project builds against, so it wins on names, props and defaults. 2. **The docs site**, `https://api.onlyoffice.com/docspace/ui-kit/getting-started`: the same pages for the released kit, plus what the package has no page for — `getting-started/{hooks|utils| constants|themes|translation|structure}`. A component is under `ui//` (`ui/overlays/aside`, `ui/form-controls/text-input`); the site's `components/` section is the portal's composites — selectors, errors, providers — not these. Read a page as Markdown by appending `.md`, and look a component up in [`llms.txt`](https://api.onlyoffice.com/docspace/ui-kit/llms.txt), one line per page, rather than guessing its group. Skip the `import` lines and the `` and `` tags: they are the site's own. 3. **This skill** — the rules below and the references: what happens when components are composed, and the failures that render without a word. Where a kit page and a rule disagree, the rule was checked against the source last: follow it and say so. ## Which component for this job | They want | Use | Not | |---|---|---| | A field in a form | `FieldContainer` `isVertical labelVisible` around the control | the control alone — no label is drawn | | A confirmation | `ModalDialog` rendered conditionally, `visible` | mounting it always and toggling `visible` | | A side panel | `Aside`, or `ModalDialog` with `displayType` aside | `Section`'s info panel, which is portal furniture | | A choice from a short list | `ComboBox` | a native `