Licence
MIT
Version
0.5.0
Deps
3
Size
73 kB
Vulns
0
Weekly
0
react-temporal-ui
A UI library for time based units in React, providing hooks and components for calendars.
Documentation can be found here
Installation
npm install react-temporal-ui
Usage
import { useCalendar } from 'react-temporal-ui';
const App = () => {
const { weeks, nextMonth, prevMonth } = useCalendar();
return (
<>
<button onClick={prevMonth}>Prev</button>
<button onClick={nextMonth}>Next</button>
{weeks.map((week, i) => (
<div key={i}>
{week.map((day, j) => (
<p>{day.getDate()}</p>
))}
</div>
))}
</>
);
};
License
This project is licensed under the terms of the MIT license.