coject
v2.3.18
Published
React Library
Downloads
2,905
Maintainers
Readme
Coject v2.0
The Coject library exported as React.js components. All Component Is Dependency On Material UI Library.
Installation
Using npm:
// npm install
$ npm i coject
// yarn install
$ yarn add coject
Dependency npm [For JavaScript/TypeScript Project]:
// npm install
$ npm i @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-data-grid @mui/x-date-pickers coject moment coject-hijri react-hook-form react-toastify tss-react axios
// yarn install
$ yarn add @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-data-grid @mui/x-date-pickers coject moment coject-hijri react-hook-form react-toastify tss-react axios
<!-- Add Font In /public/index.html Head -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
Important
- Create
.env
File In The Same Directory Where Yourpackage.json
Is - Define The Following Variable
GENERATE_SOURCEMAP=false
In React.js:
// Load Input Components
import { Form, Input } from 'coject';
// Use It Inside Component
function FormApp() {
return (
<>
<Form onSubmit={(formData) => console.log(formData)}>
<Input type="email" name="username" label="Username" />
<Input type="password" name="password" label="Password" />
</Form>
</>
);
}
const root = createRoot(document.getElementById('root'));
root.render(<App />);
See the package source for more details.
Note: Install Material UI for Coject use in the React.js > 16.
Support
Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.