Coder Social home page Coder Social logo

cms-nextjs-template's Introduction

Admin Dashboard

Developed this dashboard using nextjs with lots of love.

This dashboard comes with lots of features which can reduce development time.

Available UI Components

Layout Component to provide you Header and Sidebar

Layout Component brings up Top Header and Side Navigation Controls

import Layout from "@/components/layout";

const Home = props => (
    <Layout>
        <p>Hello World</p>
    </Layout>
)

Page Header Component with page heading and subheading and action components

import HeaderSection from "@/components/HeaderSection";
import ActionButton from "@/components/ActionButton";
import { UtlinePlusCircle } from "react-icons/ai";

const Profile = (props) => {
    return (
        <>
            <HeaderSection
                heading={"Dashboard"}
                subHeading={"Welcome to dashboard"}
                rightItem={() => (
                    <ActionButton
                        onClick={() => setModal(true)}
                        Icon={UtlinePlusCircle}
                        label="Add New User"
                    />
                )}
            />
        </>
    );
}

Section Component to wrap page content

Section component is a container which brings alignment and spacing for content

import Section from "@/components/Section";
import DataCard from "@/components/DataCard";

const Home = () => {
    return (
        <Section>
            <DataCard
                label={"Total Revenue"}
                value={"23,34,450"}
                percentageValue={56.4}
                inverse={true}
            />
            <DataCard
                label={"Total Customer"}
                value={"45,09,333"}
                percentageValue={3.45}
            />
            <DataCard
                label={"Total Profit"}
                value={"43,54,111"}
                percentageValue={10.89}
            />
        </Section>
    );
}

Table component

import Table from "@/components/Table";

const BillingHistory = () => {
    return (
        <Table
            # Main Heading of the table
            mainHeading={"Billing history"}
            # Sub Heading of the table
            subHeading={"Download your previous plan bill and usuage details."}
            # Table Right Side Component
            headingRightItem={() => (
                <ActionButton
                onClick={openModal}
                label="Download All"
                Icon={FaCloudDownloadAlt}
                />
            )}
            # Table Column Heading [{key: id, heading: Id }, ...]
            heading={table_column_heading}
            # Table Row data [{id: { value: 1 }}, ....]
            data={table_data}
        />
    );
}

Modal Component

import Modal from "@/components/Modal";

const ExampleModal = (props) => {
    const [modal, setModal] = useState(false);

    const handleClose = () => {
        //alert('closing');
        setModal(false);
    };

    const handleCancel = () => {
        setModal(false);
    }

    const handleSubmit = () => {
        alert('Submit is working..!');
        handleClose();
    }

    return (
        <Modal
            isOpen={modal}
            onClose={handleClose}
            heading={"Dashboard"}
            positiveText={"Save Changes"}
            negativeText={"Cancel"}
            onCancel={handleCancel}
            onSubmit={handleSubmit}
        >
    );
}

Input Text Component

import Input from "@/components/Input";

    <Input
        inputContainerStyle={{ padding: "15px 30px" }}
        type="text"
        placeholder="Email"
        onChange={(e) => console.log(e)}
        name="email"
        label={"Email"} />
npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

cms-nextjs-template's People

Contributors

rizwan17 avatar badrusalsyihab avatar imrankhannn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.