一键导入
radix-primitives
Radix UI headless primitives — accessible, unstyled React components for dialogs, dropdowns, tooltips. Use when working with radix primitives.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Radix UI headless primitives — accessible, unstyled React components for dialogs, dropdowns, tooltips. Use when working with radix primitives.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Enforce staged execution discipline on large tasks: written stage plan, parallel sub-agent delegation, failable verification at each stage, and skeptical self-review before delivery. Use when tasks span multiple files, multiple sources, or multiple sessions. Also triggers on "do this thoroughly", "be systematic", "deep work mode", "be thorough".
Write production-quality code from specs — reads requirements, researches patterns, implements with tests, and iterates until verification passes. Use when implementing features, fixing bugs with known root causes, or building new modules.
Ship code to production through a controlled pipeline with verification gates and rollback plans. Use when deploying features, managing CI/CD, running database migrations, or performing post-incident hotfix recovery.
Investigate topics deeply with cross-referenced sources and produce evidence-backed findings. Use when evaluating technologies before adoption, analyzing competitors, or investigating bug root causes across docs and issues.
Read code changes with adversarial intent to find bugs, security holes, logic errors, and performance traps. Use when reviewing PRs, auditing refactoring for regressions, or running pre-deploy safety checks.
Detect and fix code style violations, enforce project conventions, and ensure consistent formatting across the codebase. Use when cleaning lint errors before PRs, migrating linters, or bulk-applying new rules.
基于 SOC 职业分类
| name | radix-primitives |
| description | Radix UI headless primitives — accessible, unstyled React components for dialogs, dropdowns, tooltips. Use when working with radix primitives. |
| domain | content |
| tags | ["content-creation","digital-content","media","primitives","radix"] |
Radix UI provides unstyled, accessible React primitives (Dialog, Dropdown, Popover, Tooltip, etc.) that handle behavior, keyboard navigation, and ARIA attributes. Style them with Tailwind, CSS, or any CSS-in-JS.
Trigger phrases:
"radix primitives"
"Building a custom design system from scratch"
"Need accessible components without Material/Chakra styling"
"Using shadcn/ui (built on Radix primitives)"
Building a custom design system from scratch
Need accessible components without Material/Chakra styling
Using shadcn/ui (built on Radix primitives)
Need fine-grained control over component behavior and appearance
The radix-primitives workflow follows a standard pipeline pattern.
Core flow:
# radix-primitives primary flow
input = prepare(raw_data)
result = process(input, config={accessible, components, dialogs, dropdowns, headless})
validate(result)
deliver(result)
Error handling:
on error:
log(error_details)
retry_with_backoff(max=3)
if still_failing: alert_and_escalate()
# radix-primitives primary flow
input = prepare(raw_data)
result = process(input, config={accessible, components, dialogs, dropdowns, headless})
validate(result)
deliver(result)
on error:
log(error_details)
retry_with_backoff(max=3)
if still_failing: alert_and_escalate()
npm install @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-popover
npm install @radix-ui/react-tooltip @radix-ui/react-tabs @radix-ui/react-accordion
import * as Dialog from "@radix-ui/react-dialog"
export function Modal({ children, trigger }) {
return (
<Dialog.Root>
<Dialog.Trigger asChild>{trigger}</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay className="fixed inset-0 bg-black/50 backdrop-blur-sm" />
<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg p-6 w-[90vw] max-w-md">
{children}
<Dialog.Close className="absolute top-4 right-4">✕</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
)
}
import * as DropdownMenu from "@radix-ui/react-dropdown-menu"
export function Menu({ items }) {
return (
<DropdownMenu.Root>
<DropdownMenu.Trigger className="px-4 py-2 bg-gray-100 rounded">
Options
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="bg-white rounded-md shadow-lg p-1 min-w-[160px]">
{items.map((item) => (
<DropdownMenu.Item key={item.id} className="px-3 py-2 rounded hover:bg-gray-100 cursor-pointer">
{item.label}
</DropdownMenu.Item>
))}
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
)
}
import * as Tooltip from "@radix-ui/react-tooltip"
export function Tip({ children, content }) {
return (
<Tooltip.Provider delayDuration={200}>
<Tooltip.Root>
<Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Content className="bg-gray-900 text-white text-sm px-3 py-1.5 rounded" sideOffset={5}>
{content}
<Tooltip.Arrow className="fill-gray-900" />
</Tooltip.Content>
</Tooltip.Portal>
</Tooltip.Root>
</Tooltip.Provider>
)
}
<Trigger asChild><Button>Open</Button></Trigger> — composes without extra DOMdata-[state=open] and data-[state=closed] for CSS transitions| Rationalization | Reality |
|---|---|
| "Good enough content works" | Quality content drives engagement. Mediocre content gets ignored. |
| "I will optimize later" | SEO and distribution need optimization from the start. |
| "Templates are good enough" | Templates are a starting point. Custom content outperforms generic. |