Getting Started
Start your React project with toolchains like Create-React-App
, NextJS
, or GatsbyJS
. Or use a bundler like Parcel
and install react
and react-dom
yourself. Learn more from the official docs.
npx create-react-app my-project && cd my-project
#
InstallationOnce you have your React project started, install the kantan-components
package by using the command:
npm install kantan-components
Or do it with yarn:
yarn add kantan-components
After installing the package, simply import the Component that you want to use for your project.
#
Exampleimport { Message } from "kantan-components";import { useState } from "react";
const App = () => { const [open, setOpen] = useState(false); return ( <> <button onClick={() => setOpen(true)}>open message</button> {open ? ( <Message onClose={() => setOpen(false)} ms={2000}> SUCCESS! </Message> ) : null} </> );};