Integration
How Primitives fits into the rest of FoundryKit.
Integration
Primitives sits underneath Components and Blocks. If you are composing your own design system, start here. If you want more opinionated UI, move up a layer to Components or Blocks.
Recommended Stack
- Use Tailwind for shared global styles.
- Use Utils for
cnif you are authoring app-specific wrappers. - Use Types when you need the same search or registry interfaces that other FoundryKit packages share.
Typical Pattern
import { Button, Dialog, DialogContent, DialogTrigger } from '@foundrykit/primitives';
export function Example() {
return (
<Dialog>
<DialogTrigger asChild>
<Button>Open dialog</Button>
</DialogTrigger>
<DialogContent>Composable primitive content</DialogContent>
</Dialog>
);
}Reach for package-local wrappers in your app when you need branding, app-specific defaults, or a narrower API than the raw primitive exports provide.