UI kit (AntFabric UI)
Every screen, core or plugin, imports its components from one name: @antfabric/ui-kit on the
web, desktop and App Admin, @antfabric/ui-kit/native on the phone. Behind that name is
AntFabric UI, the design system for the whole
product. The kit is part of core (libs/ui-kit), not a plugin: the shell, App Admin and every
app are built on it, so every instance has it and no instance file lists it.
libs/ui-kit @antfabric/ui-kit src/index.ts React: AntFabric UI + core's extras '@antfabric/ui-kit' src/data.ts tables, KPIs, charts (recharts) '@antfabric/ui-kit/data' src/native.ts React Native: AntFabric UI + extras '@antfabric/ui-kit/native' src/native-data.ts the phone's data components '@antfabric/ui-kit/native/data' src/react, src/native the extras (rich text, fonts, renamed types) src/core rich-text parsing shared by both package.json depends on @antfabric-ui/core, /react, /react-native- Import
@antfabric/ui-kitonly. Lint rejects@antfabric-ui/*in plugins: core’s name keeps working when the library renames or moves something. /datais a separate entry so screens without tables or charts never load recharts.- An instance’s look comes from its branding (colours, logo) and navigation layout, not from a
different kit. Plugins’
platform.uirange is checked against this package’s version. - Older instance files may still list
af.antfabric-ui(the kit was a plugin until 16 November 2026). The build skips that line and says it can go.
Where the packages come from
Section titled “Where the packages come from”AntFabric UI publishes @antfabric-ui/core, @antfabric-ui/react and @antfabric-ui/react-native
to its GitLab package registry when its owner tags a release. There is no release yet, so the
packages are built from the library’s repository and kept as tarballs in vendor/antfabric-ui/
(the library’s own CONSUMING.md describes this). See vendor/antfabric-ui/README.md to refresh them.
When the registry has a release:
- Add an
.npmrcscope line for@antfabric-uiwith aGITLAB_TOKEN(read_package_registry); CI usesCI_JOB_TOKENonce the library’s owner allows this project. - Change the three
file:versions inlibs/ui-kit/package.jsonto the release. - Remove the
@antfabric-ui/coreoverride frompnpm-workspace.yamland deletevendor/.
Taking a new AntFabric UI release
Section titled “Taking a new AntFabric UI release”Core takes each release on purpose, in one merge request; plugins get it when they update core.
- In
libs/ui-kit/package.json, set the three@antfabric-ui/*versions to the release (until then: refresh the tarballs and record the library commit invendor/antfabric-ui/README.md). pnpm install, thenpnpm nx run-many -t typecheck lint testand look at the web, App Admin and phone screens.- Renamed or removed exports: keep the old name working in
src/react/index.tsorsrc/native/index.tsfor one core release, and say so in the merge request. - A breaking release raises
libs/ui-kit‘s version (its major for a break), which plugins’platform.uiranges are checked against.
What core adds on top
Section titled “What core adds on top”| Export | Why |
|---|---|
RichText, FormatToolbar, formatSelection, parseRichText, … |
The chat’s formatted text; AntFabric UI has no rich-text renderer |
fonts (native) |
The Figtree files for useFonts, from @antfabric-ui/core/fonts/ |
Os, Presence, Identity, NavDestination, TabItem, SegmentedItem, KitPlatform |
Names core already used, aliased to AntFabric UI’s (OS, AvatarPresence, …) |
brandVars, tokensCss, resolveTokens, formatShortcut, initials |
Re-exported from @antfabric-ui/core |
The shell’s navigation
Section titled “The shell’s navigation”The rail and the sidebar (see Navigation layouts) are drawn by
libs/app-shell/src/layouts/column.tsx, and the top bar by top.tsx (with AntFabric UI’s Menu for “More”), from AntFabric UI’s basic pieces (Icon, IconButton,
Badge, Avatar). AntFabric UI’s own NavRail is its chat product’s rail: fixed destinations
(Assistant, Channels…), its own logo and workspace switcher, Search and “Report a bug”. Its WebTopBar is
the same product’s browser bar (back and forward, search, open the desktop app, help) with no
menu entries. Core needs plugins’ entries and the instance’s name, so it draws its own.
Differences that matter when writing screens
Section titled “Differences that matter when writing screens”- Props are the documented ones plus
style. NoclassNameor DOM attributes. - A field shows its
erroronly withinvalid:<TextField error="…" invalid />. - A form dialog’s confirm button carries its shortcut in its accessible name (“Sign out Ctrl+Enter”).
Tests match it with
/^Sign out/. - The page background and margin are the shell’s:
ShellRootpaintssurface.pageand resetshtml/body, which AntFabric UI leaves alone. InlineBannerannounces politely (role="status"), never as an alert.- The phone’s
ListItemhas no long press. Wrap it in aPressablethat carriesonPressandonLongPress(see the phone inbox). - Tests: jsdom lacks
matchMediaandResizeObserver, which the kit uses. Test setup files callinstallDomShims()from@antfabric/sdk-web/testing. The phone’s Jest transforms@antfabric-ui/*and the chart packages.
Questions for the library’s owner
Section titled “Questions for the library’s owner”| Question | What core does now |
|---|---|
NavRail keys are a fixed union; could they be string, with the logo, search and bug report optional? |
Draws its own column from basic pieces |
Phone ListItem: onLongPress and titleLines? |
Wraps rows in a Pressable; titles are one line |
An error InlineBanner as role="alert"? |
Keeps status |
| A release tag, so we install from the registry | Vendored tarballs |
| Satoshi (headlines) is not packed for licence reasons; may AntFabric’s apps ship it? | Headlines fall back to Figtree / the system font |