Skip to content

Helpers & utilities ​

cn, buttonVariants, useIsMobile.

Components ​

  • cn — Helper clsx + tailwind-merge.
  • buttonVariants — Helper class CVA cho host không phải Button (ví dụ Link).
  • useIsMobile — Hook breakpoint dùng bởi Sidebar / pattern mobile.
  • isAppWebView — Phát hiện React Native WebView qua window.ReactNativeWebView.postMessage.

Sample strip ​

Chỉ code sample (không Preview live). Full API trên từng trang helper.

cn ​

TSX
import { cn } from "@minap/ui";
cn("px-2", condition && "bg-muted");

buttonVariants ​

TSX
import { buttonVariants } from "@minap/ui";
<a className={buttonVariants({ variant: "outline" })}>

useIsMobile ​

TSX
import { useIsMobile } from "@minap/ui";
const mobile = useIsMobile();

isAppWebView ​

TSX
import { isAppWebView, useIsAppWebView } from "@minap/ui";
const inWebView = isAppWebView();
// or: const inWebView = useIsAppWebView();

MINAP UI · SoT docs/ (VI + thuật ngữ EN)