Back to Mantine

Mantine hooks

apps/mantine.dev/src/pages/hooks/package.mdx

9.2.01.2 KB
Original Source

import { SliderDemos } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';

export default Layout(MDX_DATA.HooksPackage);

Mantine hooks

The @mantine/hooks package provides more than 70 hooks to build custom components. The @mantine/hooks package is used internally in most other @mantine/* packages – it is required to be installed in your project to use Mantine components.

Installation

<InstallScript packages="@mantine/hooks" />

Usage

The @mantine/hooks package can be used in any web React application, and state management hooks (like use-pagination or use-queue) are also compatible with React Native. The package can be used even if you do not use Mantine components or other Mantine libraries – it is standalone and has no dependencies except React.

Example of using use-move hook to create a custom slider:

<Demo data={SliderDemos.customSlider} demoProps={{ defaultExpanded: false }} />

License

MIT