Form context
@mantine/form
package now exports createFormContext
function to create provider component,
hook to get form object from context and use-form hook with predefined type:
Indicator improvements
Indicator component now includes more features to work with number labels and processing
prop:
999
999
999
Switch improvements
Switch component now supports thumbIcon
prop and any React node can now be used on onLabel
and offLabel
props:
Grid improvements
Grid.Col component now supports setting column span (and other related responsive props) to auto
and content
:
1
2
3
fit content
2
use-previous hook
use-previous hook stores the previous value of a state in a ref,
it returns undefined
on initial render and the previous value of a state after rerender:
Current value:
Previous value:
Other changes
- ColorSwatch now supports
withShadow
prop - MultiSelect dropdown is no longer opened when selected item is removed
- Radio.Group component now supports
name
prop to set name on every childRadio
component - AppShell component now supports
hidden
prop to hideHeader
,Footer
,Navbar
andAside
components - Carousel component now supports
skipSnaps
andcontainScroll
props - NumberInput
type
can now be changed - NotificationsProvider now supports
target
prop to set Portal target - New use-session-storage hook