Skip to content

Notice ​

On uni-app x, App-side styling is driven by UCSS, which differs in capability from Web CSS. When using uView Pro X, keep the following cross-platform conventions and limits in mind.

Styling capabilities ​

  • Layout is flex-first: containers must explicitly declare display: flex and flex-direction; do not rely on default flow.
  • App does not support @keyframes: rotation / shine / stripe animations inside components are driven on App by JS means such as UniElement.animate; H5 and WeChat Mini Program still use SCSS @keyframes. The result looks consistent across platforms but the implementation path differs.
  • App does not support pseudo-elements: components do not rely on ::before / ::after for visual effects (only WeChat Mini Program uses ::after to reset the native button's default border — a platform-specific exception).
  • CSS gap shorthand is not supported: use margin / padding for spacing; gap has no effect.
  • App supports class selectors only: theme default variables are carried by the page selector (not :root); do not carry themes on tag or pseudo-class selectors.

Theming and style isolation ​

  • Theme colors are delivered via CSS variables (--u-* / --u-type-*), so re-skinning needs no component source changes — see Theming.
  • The demo project enables style isolation 2.0; on H5 you may need to import a base style file in main.uts. Follow your project's actual configuration.

Platform differences ​

  • App: additionally supports native theme sync (uni.setAppTheme), system theme watching, and more.
  • H5: supports injecting the language via a lang URL parameter, used to sync demo-page language from the docs site.
  • WeChat Mini Program: some native capabilities (e.g. UniElement.animate) are unavailable, so animations fall back to CSS @keyframes.

Using components ​

  • Components share the ux- prefix and are imported automatically by easycom — no manual registration.
  • Component props / events / slots are all typed; see the API sections of each component page for exact values.
  • Platform-specific capabilities (e.g. App-only entries, Mini Program open-type) are noted in each component page's "Compatibility" and "Notes" sections.

Migration note ​

uView Pro X is the uni-app x migration of uView Pro (the uni-app Vue 3 version). The API is largely consistent, but due to UCSS and UTS constraints, a few components' implementation and available capabilities differ from the Vue 3 version. Always refer to the actual component pages on this docs site.