Skip to content

Platform Support ​

First-release platform scope ​

PlatformStatusNotes
H5✅ FullAll components fully functional
WeChat Mini Program✅ Full (partial degradation)Desktop-class capabilities of overlay components are degraded; see the table below
Alipay / Douyin Mini Program🚫 Not supported in the first releaseColumns will be added after per-target verification via conditional compilation
App (nvue)🚫 Not plannedThe nvue rendering system differs from webview and is not on the roadmap

Component capability matrix ​

"Degrade" means unsupported platform capabilities are removed directly by compile-time guards (no dead code in the Mini Program package), not a runtime failure.

ComponentH5WeChat Mini ProgramDegradation strategy / notes
config-providerFullFullprovide/inject + inline CSS variables work on all platforms; dark mode toggles via the page.dark class (no document)
button / tagFullFull—
iconFullFulliconfont font approach (the web builds use inline SVG; see "icon rendering differences" below)
inputFullFullPlaceholder styling goes through the placeholder-style prop (MP does not support ::placeholder)
checkbox / radio / switchFullFullDrawn with view (native components are not used, unifying the lh visual language)
form / form-itemFullFullValidation logic lives in core pure functions, with zero platform dependencies
selectFullDegradedroot-portal + two-frame measurement positioning; keyboard navigation is H5-only, MP relies on taps + scroll-view
dialogFullDegradedroot-portal; focus-trap / lockScroll are H5-only, MP falls back to mask interception
tooltipFullDegradedTwo-frame measurement positioning; no hover, the MP target is triggered by tap / touch
message / loadingFullFullMount-point pattern (the Mini Program has no document, so DOM cannot be created via JS)

Specific WeChat Mini Program limitations and alternatives ​

LimitationAlternative
The <svg> tag is not supportedIcons are converted at build time to an iconfont font (base64 embedded), rendered via <text class="lh-iconfont">
::placeholder is not supportedThe placeholder-style / placeholder-class props of input
* wildcards / attribute selectors / :not() / :nth-* are not supportedBuild-time sanitization: * wildcards are mapped to flex + gap, the rest are replaced with equivalent class names
No document / document.bodyOverlays go through root-portal; imperative services use the mount-point pattern
No keyboard focus semanticsfocus-trap / keyboard navigation are not called under the LH_IS_H5 guard; aria attributes are still emitted for screen readers
transitionend is unreliableEnter/leave animations use CSS transition + setTimeout to align durations
Components are not fully created at the onLoad stageAll ref / measurement calls must happen after onReady

WeChat base library version ​

  • root-portal requires base library ≥ 2.25.2 (the overlay mounting of select / dialog / tooltip depends on it).
  • Lower versions automatically degrade to in-page fixed positioning (detected by getLhLibVersion()); the overlay is still present, only its stacking is constrained by the page flow.

root-portal and targets such as DingTalk ​

lh-root-portal uses conditional compilation to split three ways: H5 uses <teleport to="body">, WeChat uses <root-portal>, and targets that do not support root-portal (such as DingTalk) use in-page fixed positioning. This is an internal component; consumers do not need to care about it — it is listed here only to explain the source of the platform differences in overlay behavior.