use-scroll-spy hook
New use-scroll-spy hook tracks scroll position and returns index of the element that is currently in the viewport. It is useful for creating table of contents components (like in mantine.dev sidebar on the right side) and similar features.
Scroll to heading:
TableOfContents component
New TableOfContents component is built on top of use-scroll-spy
hook
and can be used to create table of contents components like the one on the right side of mantine.dev
documentation sidebar:
Input.ClearButton component
New Input.ClearButton
component can be used to add clear button to custom inputs
based on Input
component. size
of the clear button is automatically
inherited from the input:
Popover with overlay
Popover and other components based on it now support withOverlay
prop:
Container queries in Carousel
You can now use container queries in Carousel component. With container queries, all responsive values are adjusted based on the container width, not the viewport width.
Example of using container queries. To see how the grid changes, resize the root element of the demo with the resize handle located at the bottom right corner of the demo:
RangeSlider restrictToMarks
RangeSlider component now supports restrictToMarks
prop:
Pagination withPages prop
Pagination component now supports withPages
prop which allows hiding pages
controls and displaying only previous and next buttons:
Showing 1 – 10 of 145
useForm touchTrigger option
use-form hook now supports touchTrigger
option that allows customizing events that change touched state.
It accepts two options:
change
(default) – field will be considered touched when its value changes or it has been focusedfocus
– field will be considered touched only when it has been focused
Example of using focus
trigger:
Help Center updates
- Native browser validation does not work in some components, what should I do? question
- My styles are broken with disabled JavaScript. What should I do? question
- How can I add fuzzy search to Select component? question
- use-local-storage hook returns real value only after mounting, is it a bug? question
- How can I upload files from Dropzone component? question
Other changes
- Autocomplete now supports
clearable
prop - where-* mixins documentation has been added
- use-local-storage hook now supports
sync
option which allows disabling synchronization between browser tabs