Component APIs
Complete API reference for all Matrix UI components with prop definitions, types, and usage examples.
Common Props
Most Matrix UI components accept these common props:
| Prop | Type | Description |
|---|---|---|
| className | string | Additional CSS classes to apply |
| style | CSSProperties | Inline styles |
| children | ReactNode | Child elements |
| asChild | boolean | Render as the child element (Radix UI slot) |
TypeScript Support
All components are fully typed. Import types alongside components:
import { Button, type ButtonProps } from '@matrix-ui/components'
interface MyComponentProps {
buttonProps?: ButtonProps
}
function MyComponent({ buttonProps }: MyComponentProps) {
return <Button {...buttonProps}>Click me</Button>
}