AI студия Владимира Ломтева
УСЛУГИПРОЕКТЫСТАТЬИБАЗА ЗНАНИЙМаркетплейсОбучениеПолезные сервисы

Оставьте заявку,
чтобы обсудить проект

Напишите ваш вопрос, не забудьте указать телефон. Мы перезвоним и все расскажем.

Контакты

Москва

Работаем по всей России
и миру (онлайн)

+7 (999) 760-24-41

Ежедневно с 9:00 до 21:00

lamooof@gmail.com

По вопросам сотрудничества

TelegramWhatsApp

Есть предложение?

Напишите нам в мессенджеры

© 2025 AI студия Владимира Ломтева

Политика конфиденциальностиСогласие на обработку ПДн|ИНН 623412173261
    Mantine Custom Components — Скилл для ИИ-агентов | AI Рассвет

    Mantine Custom Components

    Build custom components that integrate with Mantine's theming, Styles API, and core features. Use this skill when: (1) creating a new component using factory(), polymorphicFactory(), or genericFactory(), (2) adding Styles API support (classNames, styles, vars, unstyled), (3) implementing CSS variables via createVarsResolver, (4) building compound components with sub components and shared context, (5) registering a component with MantineProvider via Component.extend(), or (6) any task involving Factory, useProps, useStyles, BoxProps, StylesApiProps, or ElementProps in @mantine/core.

    Скиллы для разработки#GitHub#mantinedev/skills#skills.sh
    Скачивания
    0
    В избранном
    0
    Комментарии
    0
    Просмотры
    1

    Установить скилл

    Добавьте инструмент одной командой или скачайте проверенный архив версии.

    npx skills add mantinedev/skills --skill mantine-custom-components
    Скачать ZIP
    Версия
    1.0.0+222191c6b15d
    Автор
    Владимир Ломтев
    Репозиторий
    mantinedev/skills
    GitHub: mantinedev/skills

    Как установить

    1. 1Скопируйте команду из блока установки.
    2. 2Запустите её в терминале из каталога проекта.

    Документация

    Mantine Custom Components Skill

    Component template

    import {
      Box, BoxProps, createVarsResolver, ElementProps,
      factory, Factory, getRadius, MantineRadius,
      StylesApiProps, useProps, useStyles,
    } from '@mantine/core';
    import classes from './MyComponent.module.css';
    
    export type MyComponentStylesNames = 'root' | 'inner';
    export type MyComponentVariant = 'filled' | 'outline';
    export type MyComponentCssVariables = { root: '--my-radius' };
    
    export interface MyComponentProps
      extends BoxProps, StylesApiProps<MyComponentFactory>, ElementProps<'div'> {
      radius?: MantineRadius;
    }
    
    export type MyComponentFactory = Factory<{
      props: MyComponentProps;
      ref: HTMLDivElement;
      stylesNames: MyComponentStylesNames;
      vars: MyComponentCssVariables;
      variant: MyComponentVariant;
    }>;
    
    const defaultProps = { radius: 'md' } satisfies Partial<MyComponentProps>;
    
    const varsResolver = createVarsResolver<MyComponentFactory>((_theme, { radius }) => ({
      root: { '--my-radius': getRadius(radius) },
    }));
    
    export const MyComponent = factory<MyComponentFactory>((_props) => {
      const props = useProps('MyComponent', defaultProps, _props);
      const { classNames, className, style, styles, unstyled, vars, attributes, radius, ...others } = props;
    
      const getStyles = useStyles<MyComponentFactory>({
        name: 'MyComponent', classes, props,
        className, style, classNames, styles, unstyled, vars, attributes, varsResolver,
      });
    
      return <Box {...getStyles('root')} {...others} />;
    });
    
    MyComponent.displayName = '@mantine/core/MyComponent';
    MyComponent.classes = classes;
    

    Factory variant — which to use

    Scenario Factory function Type
    Standard component factory() Factory<{}>
    Supports component prop (polymorphic) polymorphicFactory() PolymorphicFactory<{}> — add defaultComponent and defaultRef
    Props change based on a generic (e.g. multiple) genericFactory() Factory<{ signature: ... }>

    Use polymorphicFactory sparingly — it adds TypeScript overhead and slows IDE autocomplete.

    Factory type fields

    Factory<{
      props: MyComponentProps;       // required
      ref: HTMLDivElement;           // element type for the forwarded ref
      stylesNames: 'root' | 'inner'; // union of Styles API selectors
      vars: { root: '--my-var' };    // CSS variable map per selector
      variant: 'filled' | 'outline'; // accepted variant strings
      staticComponents: {            // sub-components (compound pattern)
        Item: typeof MyComponentItem;
      };
      compound?: boolean;            // true = sub-component; disables theme classNames/styles/vars
      ctx?: MyContextType;           // passed to styles/vars resolvers as third arg
      signature?: (...) => JSX.Element; // only for genericFactory
    }>
    

    Theme integration

    Users and the theme can override defaults via Component.extend():

    const theme = createTheme({
      components: {
        MyComponent: MyComponent.extend({
          defaultProps: { radius: 'xl' },
          classNames: { root: 'my-root' },
          styles: { root: { color: 'red' } },
          vars: (_theme, props) => ({ root: { '--my-radius': getRadius(props.radius) } }),
        }),
      },
    });
    

    References

    • references/api.md — All imports: factory, useProps, useStyles, createVarsResolver, createSafeContext, StylesApiProps, CompoundStylesApiProps, BoxProps, ElementProps, theme helpers (getSize, getRadius, etc.)
    • references/patterns.md — Full examples: compound components with context, polymorphic component, generic component, theme integration

    Требования и возможности

    Источник пакета
    https://github.com/mantinedev/skills/tree/222191c6b15d1ae2c02051a285f47230777be513/skills/mantine-custom-components

    Файлы версии

    ПутьРазмерSHA256
    SKILL.md42891b3803d4a1075669...
    references/api.md11927d9a4adba4023b043...
    references/patterns.md111139ad573faf6e3138b...

    Частые вопросы

    Как установить Mantine Custom Components?
    Используйте команду npx skills add mantinedev/skills --skill mantine-custom-components или скачайте ZIP-архив.
    Можно ли скачать Mantine Custom Components бесплатно?
    Да, опубликованную версию можно скачать из маркетплейса бесплатно.

    Похожие инструменты

    Смотреть все
    Terraform Style GuideGenerate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.2ГИС: Статическая карта 2ГИССформировать PNG-карту с точками, линиями или полигонами.2ГИС: Матрица расстояний 2ГИСРассчитать время и расстояния между наборами точек.PortlessSet up and use portless for named local dev server URLs (e.g. https://myapp.localhost instead of http://localhost:3000). Use when integrating portless into a project, configuring dev server names, setting up the local proxy, working with .localhost domains, or troubleshooting port/proxy issues.
    Комментарии

    Войдите, чтобы оставить комментарий.

    Комментариев пока нет.

    Установить скилл

    Добавьте инструмент одной командой или скачайте проверенный архив версии.

    npx skills add mantinedev/skills --skill mantine-custom-components
    Скачать ZIP
    Версия
    1.0.0+222191c6b15d
    Автор
    Владимир Ломтев
    Репозиторий
    mantinedev/skills
    GitHub: mantinedev/skills