CLI
手动安装
CLI 将组件源(及其内部依赖项)复制到您的项目中并安装任何所需的 npm 包。
npx boardui@latest add announcement使用共享 UI 包或自定义导入别名? 配置您的安装路径 在运行 CLI 之前。复制粘贴示例使用默认导入。
变化
每个部分都是可选的 - 交换 图标,删除 描述 或 actionLabel,并切换 dismissible.
import { RiSparklingFill } from "@remixicon/react";
{/* Custom icon */}<Announcement icon={RiSparklingFill} title="What's new in v2" description="Charts, command menu, and a brand-new data table." actionLabel="See the changelog"/>
{/* No action */}<Announcement title="You're all set" description="Your workspace is ready to go." dismissible />
{/* Title + action only */}<Announcement title="2 seats left on your plan" actionLabel="Upgrade" />