1.0.7 • Published 7 months ago

bottom-panel-react v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

🚀 Bottom Panel React Component

A fully customizable React bottom panel component that allows you to create dynamic and interactive panels for your web applications.

Check out the Example to see it in action.

Getting Started 😁

Installation

Install the package locally using npm:

npm install bottom-panel-react
  • Usage
import BottomPanel from "bottom-panel-react";

const YourComponent = () => {
  return (
    <div className={style.container}>
      <BottomPanel
        panelState={"bottom"} // Set Initial State of Panel from ["top", "bottom", "middle"]
        getPanelState={(value) => { }} // Get the Current State of Panel
      >
        {/* 
          Your Components that you want to render inside Bottom Panel
         */}
      </BottomPanel>
    </div>
  );
};

export default YourComponent;

Customizing Bottom Panel Component 💥

You can customize the Bottom Panel component by passing various props:

BottomPanel Props

Prop NameDefault ValueTypeDescription
panelClass"" (empty string)stringCSS class for custom styling of the panel's body.
panelBodyCSS{} (empty object)objectCustom CSS styles for the panel body.
panelDragIconnullelementIcon element for dragging the panel.
topHeightnullnumberHeight of the panel when in the "top" state.
bottomHeightnullnumberHeight of the panel when in the "bottom" state.
middleHeightnullnumberHeight of the panel when in the "middle" state.
isVisibletrueboolControls the visibility of the panel.
isKeysFunctionaltrueboolEnables key functionality for the panel(Use of Arrow Keys Up and Down).
isNavigationButtonstrueboolEnables navigation buttons for the panel.
isMiddleFunctionaltrueboolEnables functionality for the "middle" state.
throttleTime5numberThrottle time for certain panel actions(Delay between the consecutive renders, Effects smoothness of the panel).
panelState"bottom"string (enum: "bottom", "top", "middle")The current state of the panel.
getPanelState() => {}funcA function to get the current panel state.

Code example of BottomPanel Component: Example

Issues & Bugs 😵‍💫

  • Having trouble using component? Raise an issue here
  • Need Help using the component? Feel free to drop an email.