Repository navigation
v2.7.0
Full web changelog · Documentation
npm install reshaped
Calendar component
<View width="320px">
<Calendar />
</View>We're adding a new Calendar component to work with single and range date selection.
It supports controlled / uncontrolled behavior, full keyboard navigation, localization, separate month selection and much more.
Like with every other component, we pay additional attention to how it can be composed with other components and we provide examples of how you can build a form input for the date selection.
Swipe events in Modal
We've introduced a new swipe behavior for Modal components on touch devices.
All Modals besides the center-positioned ones can now be closed with touch events and you can try it for yourself if you're on mobile device or simulate it in your dev tools:
function Example() {
const { active, activate, deactivate } = useToggle(false);
return (
<>
<Button onClick={activate}>Open modal</Button>
<Modal active={active} onClose={deactivate} position="start">
Modal content
</Modal>
</>
);
}
Other improvements
- Source code: Added GitHub actions setup
- Themes: Updated
oncolor generation algorithm to be more precise according to the wcag requirements - Themes: Added rgb variants for the border color tokens
- Themes: Updated contrast edge cases to be handled based on the APCA formulas
- Autocomplete: Fixed inputAttributes not applying correctly
- Link: Fixed
inheritcolor value for the iOS Safari edge cases - Modal: Improved the open/close transition effect
- Overlay: Added number values support for the
transparentproperty to manually control its progress - Slider: Removed the touch highlighting on mobile devices
- Text: Updated
maxLinesto apply word-break when truncating a single line - Toast: Added className support
- View: Updated documented to refer to the updated
paddingInlineandpaddingBlockproperties