.claude/skills/radix-ui/SKILL.md
Expert guidance for building React UIs with Radix Themes and Radix Primitives. Use when creating accessible, customisable UI components, setting up theming systems, working with pre-styled Radix Themes components, or building custom components on top of unstyled Radix Primitives. Trigger keywords include "radix", "radix ui", "radix themes", "radix primitives", "accessible components", "Dialog", "Dropdown", "Select", "Accordion", "Tabs", "Tooltip".
npx skillsauth add aehrc/pathling radix-uiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Radix provides two complementary libraries for React:
Use Radix Themes when:
Use Radix Primitives when:
npm install @radix-ui/themes
import "@radix-ui/themes/styles.css";
import { Theme } from "@radix-ui/themes";
export default function App() {
return (
<Theme accentColor="indigo" grayColor="slate" radius="medium">
<MyApp />
</Theme>
);
}
Install individual components:
npm install @radix-ui/react-dialog @radix-ui/react-dropdown-menu
Or install the full package:
npm install radix-ui
The Theme component accepts these props:
| Prop | Values | Default |
| ----------------- | ------------------------------------- | ----------- |
| accentColor | indigo, cyan, crimson, orange, etc. | indigo |
| grayColor | gray, mauve, slate, sage, olive, sand | gray |
| radius | none, small, medium, large, full | medium |
| scaling | 90%, 95%, 100%, 105%, 110% | 100% |
| panelBackground | solid, translucent | translucent |
Most Themes components support these variant props:
<Button variant="solid" size="2" color="indigo" highContrast />
Common variants: classic, solid, soft, surface, outline, ghost
Sizes: "1", "2", "3", "4" (component-specific)
import { Flex, Box, Grid, Container, Section } from "@radix-ui/themes";
<Flex direction="column" gap="3" align="center" justify="between">
<Box p="4" style={{ background: "var(--gray-3)" }}>
Content
</Box>
</Flex>
<Grid columns="3" gap="4" width="auto">
<Box>1</Box>
<Box>2</Box>
<Box>3</Box>
</Grid>
import { Text, Heading, Code, Em, Strong } from "@radix-ui/themes";
<Heading size="6" weight="bold">Title</Heading>
<Text size="2" color="gray">Body text</Text>
<Code variant="soft">const x = 1</Code>
For complete Themes component reference, see references/themes-components.md.
Compound Components: Primitives use a compound component pattern with multiple parts:
import * as Dialog from "@radix-ui/react-dialog";
<Dialog.Root>
<Dialog.Trigger>Open</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay className="overlay" />
<Dialog.Content className="content">
<Dialog.Title>Title</Dialog.Title>
<Dialog.Description>Description</Dialog.Description>
<Dialog.Close>Close</Dialog.Close>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>;
Uncontrolled by Default: Components work without state management:
// Uncontrolled - manages its own state
<Dialog.Root>...</Dialog.Root>
// Controlled - you manage the state
<Dialog.Root open={isOpen} onOpenChange={setIsOpen}>...</Dialog.Root>
Use asChild to compose Radix behaviour onto custom components:
import * as Tooltip from "@radix-ui/react-tooltip";
import { MyButton } from "./MyButton";
<Tooltip.Trigger asChild>
<MyButton>Hover me</MyButton>
</Tooltip.Trigger>;
Requirements for custom components with asChild:
React.forwardRefconst MyButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ children, ...props }, ref) => (
<button ref={ref} {...props}>
{children}
</button>
),
);
With CSS classes:
<Dialog.Overlay className="dialog-overlay" />
<Dialog.Content className="dialog-content" />
With data attributes for state:
.accordion-item[data-state="open"] {
background: var(--accent-3);
}
.accordion-item[data-state="closed"] {
background: transparent;
}
With Tailwind CSS:
<Dialog.Overlay className="fixed inset-0 bg-black/50" />
<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white p-6 rounded-lg" />
For complete Primitives patterns, see references/primitives-patterns.md.
Radix Primitives implement WAI-ARIA patterns automatically:
Ensure custom implementations maintain accessibility:
// Dialog requires Title for screen readers
<Dialog.Content aria-describedby={undefined}>
<Dialog.Title>Required for a11y</Dialog.Title>
{/* If no description, set aria-describedby={undefined} on Content */}
</Dialog.Content>
tools
Expert guidance for using WireMock in Java applications for HTTP API mocking and testing. Use this skill when the user asks to mock HTTP APIs, create API stubs, test REST clients, simulate network faults, verify HTTP requests, or integrate WireMock with Spring Boot. Trigger keywords include "wiremock", "mock http", "stub api", "http mock", "api testing", "rest mock", "simulate fault", "verify request", "spring boot wiremock".
documentation
Expert guidance for implementing SQL on FHIR v2 ViewDefinitions and operations to create portable, tabular projections of FHIR data. Use this skill when the user asks to create ViewDefinitions, flatten FHIR resources into tables, write FHIRPath expressions for data extraction, implement forEach/forEachOrNull/repeat patterns for unnesting, create where clauses for filtering, use constants in view definitions, combine data with unionAll, execute ViewDefinitions with $run or $export operations, or implement SQL on FHIR server capabilities. Trigger keywords include "ViewDefinition", "SQL on FHIR", "flatten FHIR", "tabular FHIR", "FHIR to SQL", "FHIR analytics", "FHIRPath columns", "unnest FHIR", "$viewdefinition-run", "$export", "view runner", "repeat", "recursive", "QuestionnaireResponse".
development
Expert guidance for working with the Apache Spark Catalyst query optimisation framework. Use this skill when working with Spark SQL internals, creating custom expressions, implementing query optimisations, working with logical/physical plans, or extending Catalyst. Trigger keywords include "catalyst", "spark sql", "expression", "logical plan", "physical plan", "tree node", "query optimisation", "rule executor", "analyzer", "optimizer", "code generation".
development
Expert guidance for using the SonarCloud API to interact with code quality analysis, projects, issues, quality gates, and metrics. Use this skill when making API calls to SonarCloud, automating code quality workflows, retrieving analysis results, managing projects programmatically, or integrating SonarCloud with CI/CD pipelines. Trigger keywords include "SonarCloud", "SonarCloud API", "code quality API", "SonarQube Cloud", "quality gate", "code analysis API", "SonarCloud measures", "SonarCloud issues".