This skill provides reusable component templates for the Mantine UI framework, ideal for developers looking to enhance their UI. It includes customizable styles and variants for creating unique components.
$ npx skills add https://github.com/mantinedev/skills --skill mantine-custom-componentsThe Mantine Custom Components skill enables developers to build custom components that fully integrate with Mantine's theming system, Styles API, and core features. It supports component creation using factory functions (factory, polymorphicFactory, genericFactory), CSS variables via createVarsResolver, and compound component patterns. Developers can add Styles API support through classNames, styles, vars, and unstyled props, then register components with MantineProvider via Component.extend(). This skill is essential for teams building design systems or component libraries that need consistent theming, variant management, and style customization across their application.
Install the skill using the provided command and integrate it into your Mantine project.
Creating consistent UI components
Customizing component styles for different themes
Rapidly deploying reusable UI elements
$ npx skills add https://github.com/mantinedev/skills --skill mantine-custom-componentsgit clone https://github.com/mantinedev/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a reusable Mantine UI component for [COMPONENT_TYPE, e.g., 'data table', 'modal', 'card'] with the following requirements: [SPECIFIC_REQUIREMENTS, e.g., 'dark mode support', 'responsive layout', 'custom color scheme']. Use Mantine v7 syntax and include TypeScript types. Component should be optimized for [INDUSTRY, e.g., 'healthcare dashboards', 'e-commerce product cards']. Provide the full code with explanations for each part. [ADDITIONAL_CONTEXT, e.g., 'Priority: performance', 'Must include hover effects']
Here’s a reusable Mantine `DataTable` component optimized for healthcare dashboards with dark mode support, responsive layout, and TypeScript types:
```tsx
import { Table, TableProps, ScrollArea, Box, Text } from '@mantine/core';
import { useMantineTheme } from '@mantine/core';
export interface HealthcareDataTableProps extends TableProps {
data: { id: string; patientName: string; diagnosis: string; status: 'active' | 'inactive' }[];
loading?: boolean;
}
export function HealthcareDataTable({ data, loading = false, ...props }: HealthcareDataTableProps) {
const theme = useMantineTheme();
const rows = data.map((item) => (
<Table.Tr key={item.id}>
<Table.Td>
<Text size="sm" fw={500}>
{item.patientName}
</Text>
</Table.Td>
<Table.Td>
<Text size="sm" c="dimmed">
{item.diagnosis}
</Text>
</Table.Td>
<Table.Td>
<Box
bg={item.status === 'active' ? theme.colors.blue[1] : theme.colors.gray[1]}
px="xs"
py={4}
style={{ borderRadius: theme.radius.sm }}
>
<Text size="xs" c={item.status === 'active' ? 'blue' : 'gray'}>
{item.status === 'active' ? 'Active' : 'Inactive'}
</Text>
</Box>
</Table.Td>
</Table.Tr>
));
return (
<ScrollArea>
<Table striped highlightOnHover withTableBorder {...props}>
<Table.Thead>
<Table.Tr>
<Table.Th>Patient Name</Table.Th>
<Table.Th>Diagnosis</Table.Th>
<Table.Th>Status</Table.Th>
</Table.Tr>
</Table.Thead>
<Table.Tbody>{rows}</Table.Tbody>
</Table>
</ScrollArea>
);
}
```
### Key Features:
- **Dark Mode Ready**: Uses `useMantineTheme` for dynamic color adaptation.
- **Responsive**: Wrapped in `ScrollArea` for overflow handling.
- **Type Safety**: Includes `HealthcareDataTableProps` with strict data types.
- **Status Indicators**: Color-coded badges for patient status.
### Usage Example:
```tsx
<HealthcareDataTable
data={[
{ id: '1', patientName: 'John Doe', diagnosis: 'Hypertension', status: 'active' },
{ id: '2', patientName: 'Jane Smith', diagnosis: 'Diabetes', status: 'inactive' }
]}
loading={false}
style={{ width: '100%' }}
/>
```Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan