{"id":21684829,"url":"https://github.com/rand0mc0d3r/material-ui-panel","last_synced_at":"2026-05-15T01:41:02.419Z","repository":{"id":38995435,"uuid":"382579640","full_name":"rand0mC0d3r/material-ui-panel","owner":"rand0mC0d3r","description":"Self managed PanelManager build in React.js with MaterialUI inspired from VSCode window system","archived":false,"fork":false,"pushed_at":"2023-10-27T23:48:35.000Z","size":12852,"stargazers_count":2,"open_issues_count":24,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T03:20:47.257Z","etag":null,"topics":["material-ui","panel-management","panels","react","react-panel","vscode-clone","window-management"],"latest_commit_sha":null,"homepage":"https://materal-ui-panel.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rand0mC0d3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-03T09:47:41.000Z","updated_at":"2024-10-01T07:56:34.000Z","dependencies_parsed_at":"2024-11-25T16:17:17.502Z","dependency_job_id":"0caa6143-5593-417f-a142-1538b05924ff","html_url":"https://github.com/rand0mC0d3r/material-ui-panel","commit_stats":{"total_commits":395,"total_committers":3,"mean_commits":"131.66666666666666","dds":0.2835443037974683,"last_synced_commit":"0d11b42b04d1a4307a9f3cf3ecaeadc08bed7571"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rand0mC0d3r%2Fmaterial-ui-panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rand0mC0d3r%2Fmaterial-ui-panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rand0mC0d3r%2Fmaterial-ui-panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rand0mC0d3r%2Fmaterial-ui-panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rand0mC0d3r","download_url":"https://codeload.github.com/rand0mC0d3r/material-ui-panel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244603135,"owners_count":20479774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["material-ui","panel-management","panels","react","react-panel","vscode-clone","window-management"],"created_at":"2024-11-25T16:17:12.125Z","updated_at":"2025-10-03T16:26:03.197Z","avatar_url":"https://github.com/rand0mC0d3r.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📑 material-ui-panel\n\n### Alpha version (https://materal-ui-panel.herokuapp.com/)\n\n##### Documentation: https://rand0mc0d3r.github.io/material-ui-panel/\n\n\u003cbr /\u003e\n\n![/media/preview.png](/media/main1.png)\n**Hint**: Combined panels ✅ , both sides panels ✅ , Splitted sections ✅ , Panel insertion into section ✅\n\n\u003cbr /\u003e\n\n![/media/preview.png](/media/main2.png)\n**Hint**: Alerts in status-bar ✅ , Alerts in sides panels ✅ , Splitted sections template selector ✅ , Embedded web-views ✅\n\n\n![/media/preview.png](/media/main3.png)\n**Hint**: Dark-Mode ✅ , Upper bar ✅ , Menu capabilities ✅\n\nA zero-maintenance/batteries-included panel manager inspired by VSCode style/aspect that adds via Material-UI elements a self populating/managed and state keeping organization of generated children panels.\n\n\n#### Current limitations\n\n- **StatusBar**\n  - Cannot display 2 status bars, 1 up and 1 down\n  - Status items cannot be ordered\n  - Status items are not draggable\n  - Status items don't have a pre-defined size\n  - Status items require a unique id\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n**NOTE:** comes bundled with ```prop-types```. No **Typescript** support. Help me by creating a *PR* 💌 .\n\n---\n## 🪄 Installation\n\n**Minimal version** for mandatory dependencies. Up to the user to provide **React 16.0+** and **Material UI 4.0**\n\nInstall the latest version with your favorite package manager.\n\n\n```\nnpm install @kadarka/material-ui-panel --save\n```\n\n```\nyarn i @kadarka/material-ui-panel\n```\n\n---\n## 🎛️ Architecture \u0026 Structure\n\n#### DOM \u0026 CSS Grid wise\n\nThe base structure it's a grid with 5 columns, at most 5, at least 3 all the time visible, with 1 or 2 always potentially ```width: 0px```\n\nGrid-columns are ```[ ( 'leftMenu' '{leftPanel?}' ) 'main' ( '{rightPanel?}' 'rightMenu' ) ]```.\nSide note:  ```leftPanel``` and ```rightPanel``` are only visible if needed. Internally they are a ```grid-area``` sub-populated as a ```flex``` with direction ```column```\n\n##### Visually\n\n| leftMenu | leftPanel | main | rightPanel | rightMenu |\n|----------|-----------|------|------------|-----------|\n| announced panels for side: ```left``` | panels[ ] qualifying for side and visibility properties | *user main app* | panels[ ] qualifying for side and visibility properties | announced panels for side: ```right``` |\n\n### 📑 - \u003c MuiPanelProvider \u003e\n\nThe ```\u003cMuiPanelProvider\u003e``` is a HOC Context driven manager suggested to be added close the the root of the document, preferably outside the ±```\u003cRouter\u003e``` but inside the ```\u003cMuiTheme\u003e```\n\nThe **MuiPanelProvider** constitutes of a wrapper around the **Context API** that acts as a store, with a few methods exposed to the user for managing the states, along with some internal methods that allow the panels to announce themselves, broadcast state changes and react to events. Communication is duplex and the panels themselves are in a dual-binding open chat with the **Provider**.\n\n```\nimport { createTheme, ThemeOptions, ThemeProvider } from '@material-ui/core/styles'\n// import { useMemo } from 'react'\n// import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'\n// import routes from './routes'\n\nexport default (): JSX.Element =\u003e {\n  const theme = useMemo(() =\u003e createTheme({ palette: { type: 'dark' } } as ThemeOptions), [])\n\n  return \u003cThemeProvider {...{ theme }}\u003e\n\t{/* ... */}\n\t\u003cMuiPanelProvider\u003e\n\t{/* notification?... */}\n\t{/* login/modals/errors?... */}\n\t{/* ... */}\n\t\u003cRouter\u003e\n\t   {/* ... */}\n\t   \u003cSwitch\u003e\n\t     {routes.map(({ path, exact, component }) =\u003e \u003cRoute key={path} {...{ exact, path, component }} /\u003e)}\n\t   \u003c/Switch\u003e\n\t\u003c/Router\u003e\n\t{/* ... */}\n  \u003c/ThemeProvider\u003e\n}\n```\n\n##### Available tweaks's\n\n| Argument | Type |Default | Description |\n|-----|----|----|--------|\n| *allowRightClick* | boolean | ```false``` | Determines if the panel allows opening the default browser context menu on right click |\n| *initialSide* | string | ```left``` | A side option to define for a new user the preference of the menu. Options ```left``` and ```right``` |\n| *inverseMarkers* | boolean | ```false``` | Determines is the highlight markers are oriented towards the outer borders of the screen, or towards the main content of the screen |\n| *markerColor* | string | ```textPrimary``` | Sets on of the material-UI ```Typography``` range of available colors. Options ```textPrimary```, ```textSecondary```, ```primary```, ```secondary``` |\n\n---\n\n## \u003c MuiPanelManager \u003e\n\nSelf organizing manager wrapper that renders all children given\n\n##### Available API's\n\n| Argument | Default | Description |\n|-----|----|--------|\n| allowRightClick | false | Determines if the panel allows opening the default browser context menu on right click |\n\n##### Code sample\n\n```\n\u003cMuiPanelManager\u003e\n\t\u003cMuiDivider tooltip=\"Default separator\" /\u003e\n\n\t\u003cNotificationPanel /\u003e\n\n\t\u003cMupPanel title=\"Lorem Ipsum Panel\" icon={\u003cFormatIndentIncreaseIcon /\u003e}\u003e\n\t\t{`Lorem ipsum dolor sit amet, ...`}\n\t\u003c/MupPanel\u003e\n\n\t\u003cMupPanel title=\"Sample Panel\" icon={\u003cFormatAlignLeftIcon /\u003e}\u003e\n\t\t\u003cSkeleton animation=\"wave\" height={10} style={{ marginBottom: 6 }} /\u003e\n\t\u003c/MupPanel\u003e\n\u003c/MuiPanelManager\u003e\n```\n---\n\n## \u003c MuiPanelManager \u003e\n\nSelf organizing manager wrapper that renders all children given\n\n---\n## ```\u003cMuiDebug\u003e``` - 🕵️ (Internal) - Debug component\n\nA utility modal to display the current state of the panels, layout, settings and the rest of the store. It's constantly updated via the **Provider** hooks.\n\n```\n...\n\u003cMuiPanelProvider debugMode={true}...\u003e\n  ...\n\u003c/MuiPanelProvider\u003e\n...\n```\n\n\n---\n## \u003c Mui Splitter \u003e\n\nSelf organizing manager wrapper that renders all children given\n\n---\n\n## ```\u003cMupPanel\u003e``` - 🪟  Panel Component\n#####  The component creates a panel object to host the contents given. It's self registered and managed\n\n![/media/preview.png](/media/mupPanel1.png)\n**Hint**: Panels can issue notifications\n\n![/media/preview.png](/media/mupPanel2.png)\n**Hint**: Panels can feature automatic padding\n\n---\n\n## ```\u003cMupStatus\u003e``` - 📟 Status Bar Component\n\nThe component creates an object for the status bar that can be clicked. It's self registered and managed\n\n![/media/preview.png](/media/mupStatus1.png)\n\n**Hint**: Direct actions are permitted\n\n\u003cbr /\u003e\n\n![/media/preview.png](/media/mupStatus2.png)\n\n**Hint**: As well placed menu actions\n\u003cbr /\u003e\n\n![/media/preview.png](/media/mupStatus3.png)\n\n**Hint**: Informational sections\n\n\u003cbr /\u003e\n\n![/media/preview.png](/media/mupStatus4.png)\n\n**Hint**: Errors are using the secondary color\n\n---\n\nInternally the wrapper ```\u003cMupStatusBar\u003e``` bound to the scene is not being rendered and started if there are no ```\u003cMupStatus\u003e``` announced across the application at any point in time. Later instantiation is fully encouraged to de-clutter the DOM.\n\nAdd a section to either ```primary``` or ```secondary``` side of the status bar. An omission will result in a default section.\n\nEach ```MupStatus``` entity must contain an ```id``` in form of an unique identifier across the session.\n\n#### # Inherited configuration\n\n```\u003cMuiPanelProvider /\u003e``` allows the user to configure the status bar with the following properties:\n\n| Argument | Type | Default | Description |\n|-----|--|--|---|\n| allowRightClick | ```bool``` | _inherited_ | Decides if right/long click triggers any action |\n\n#### # Available arguments\n\n\n| Argument | | Type | Default | Description |\n|-----|--|--|--|---|\n|  id |⭐ | ```string``` | ... |  Give a unique identifier to the status element |\n| elements | ⭐\t| ```array```  | ```[]``` | List of objects of type ```{icon: ReactNode, text: string}```  |\n| side |\t| ```string``` | ```primary``` | Determines to which side the panel is bound |\n| requestAttention |\t| ```bool``` | ```false``` | When truthy is uses the ```secondary``` color |\n| tooltip |\t| ```string``` | ```''``` | Provides a tooltip acting as a guide |\n| focusOnClick\t| | ```string``` | _null_ | Toggles visibility of a panel known by ```\u003cMuiPanelProvider\u003e``` by it's unique identifier |\n| onClick |\t| ```func``` | ```() =\u003e {}``` | Issues callback when status section is clicked  |\n| onContextMenu |\t| ```func``` | ```() =\u003e {}``` | Issues callback when status section is right/long clicked.  |\n\n#### Code sample\n\n\n##### Simple example - static\n\n```\n// 2 icons with text\n\u003cMupStatus\n  id=\"statusA\"\n  side=\"left\"\n  tooltip='33% frames left / Ready for photo'\n  elements={[\n    { icon: \u003cFormatIndentIncrease color=\"action\" /\u003e, text: 'Lorem' },\n    { icon: \u003cCameraIcon /\u003e, text: 'Ipsum' },\n  ]}\n/\u003e\n\n// 1 icon triggering a panel\n\u003cMupStatus\n  id=\"triggerChromeCastPanel\"\n  side=\"left\"\n  focusOnClick='chromecastPanel'\n  tooltip=\"Toggle visibility for panel\"\n  elements={[\n  { icon: \u003cCastConnectedIcon /\u003e, text: 'Toggle Panel' }\n]}\u003e\n  demo text\n\u003c/MupStatus\u003e\n\n// 1 icon doing an onClick callback\n\u003cMupStatus\n  id='statusSimilarDocuments'\n  onClick={handleClickOpen}\n  tooltip=\"View Documents ... - (Last checked - 3 min ago)\"\n  elements={[{ icon: \u003cAllInboxIcon /\u003e, text: '4 Related' }]}\n/\u003e\n\n// 1 icon requesting attention, no text\n\u003cMupStatus\n  id='statusSimilarDocuments'\n  onClick={handleClickOpen}\n  requestAttention\n  tooltip=\"View Documents ... - (Last checked - 3 min ago)\"\n  elements={[{ icon: \u003cAllInboxIcon /\u003e }]}\n/\u003e\n  ```\n\n##### Dynamic example - updateable\n```\n  ...\n  const [open, setOpen] = useState(false);\n  const [elements, setElements] = useState();\n  const [requestAttention, setRequestAttention] = useState(true);\t\t\t// Request attention state\n\n  const someFunction = () =\u003e {\n   setElements([{ icon: \u003cCloudDoneOutlinedIcon /\u003e, text: 'Document saved' }])\t\t// Set an element\n   setRequestAttention(true)\t\t\t\t\t\t\t\t// Update attention state\n  }\n\n  ...\n\n  return \u003c\u003e\n    \u003cMupStatus\n      id='statusCustomElement'\n      requestAttention={requestAttention}\t\t\t\t\t\t// Reference attention state\n      onClick={() =\u003e setOpen(true)}\n      tooltip=\"Save Document?\"\n      elements={elements}\t\t\t\t\t\t\t\t// Initialize empty (won't show)\n    /\u003e\n  ```\n\n\n\n---\n## ```\u003cMupButton\u003e``` - 🛎️ Button Component\n#####  The component creates an 🏝️ ( + 📄 ) object that can be clicked. It's self registered and managed\n\n![/media/preview.png](/media/mupButton.png)\n**HINT**: Works great to display a logo or a button with a custom icon ( + text )\n\nAllows the developer to add to the sidebars a logo, a logo with a custom short text, or a button triggering a custom action.\n\n\nInternally the ```\u003cMuiPanelProvider\u003e``` is made aware of the ```\u003cMupButton\u003e``` instance after the **first render** which triggers the internal hook to upstream call the provider with a new entity.\n\n#### # Available arguments\n\n\n| Argument | Req | Observed | Type | Default | Description |\n|-----|--|--|--|--|---|\n| id |⭐ | |```string``` | ... |  Give a unique identifier to the status element |\n| icon |⭐ | 👀  | ```node``` |  | Passthru element of Node type. Uses ```cloneElement``` internally |\n| tooltip |\t| 👀  | ```string``` |  | Provides a tooltip acting as a guide |\n| shortText |\t| 👀  | ```string``` |  | Provides a short text of max 4 UTF8 chars |\n| showIcon |\t| 👀  |```bool``` | ```true``` | Used to determine if the icon should be shown in case provided |\n| disabled |\t| 👀  |```bool``` | ```false``` | Determine if the colors turn gray and interactivity is disabled |\n| onClick |\t|  | ```func``` |  | Issues callback when status section is clicked  |\n\n#### Code sample\n\n##### Simple example - static\n\n```\n\u003cMupButton\n  id=\"appLogo\"\n  tooltip={`Click here to go ${page.url}`\n  shortText=\"LKDN\"                                                  // 4 letters will be displayed in all CAPS\n  icon={\u003cBathtubIcon style={{ color: 'orange' }}                    // custom color\n  icon={\u003cLinkedInIcon style={{ color: green[500] }} /\u003e}             // custom color\n  icon={\u003cSvgIcon component={StarIcon} viewBox=\"0 0 ...\" /\u003e}         // raw svg icon\n  icon={\u003cIcon style={{ color: green[500] }}\u003eadd_circle\u003c/Icon\u003e}      // font material icon\n  icon={\u003cIcon className=\"fa fa-plus-circle\" color=\"secondary\" /\u003e}   // font awesome icon\n  showIcon={false}                                                  // hide icon\n  disabled={true}                                                   // disable interaction\n  onClick={() =\u003e console.log('clicked')}                            // callback\n/\u003e\n  ```\n\n##### Dynamic example - updateable\n  ```\n  export default ({ tooltip, shortText, icon, showIcon, disabled, ... }) =\u003e {\n\n  return \u003c\u003e\n    \u003cMupButton\n      { ... { tooltip, shortText, icon, showIcon, disabled } }\n      id=\"appLogo\"\n      ...\n    /\u003e\n  \u003c/\u003e\n  ```\n\n---\n## ```\u003cMupContent\u003e``` - ⚠️  Your Content Component -\n\nThis is the observable wrapper of your entire application. This should be included as close to root as possible where content represents your view or a representation of your current application UI.\n\n##### Available arguments\n\n\n|  | Argument | Type | Default | Description |\n|--|-----|--|--|---|\n| ⭐ | children | ```Node``` | ... |  Passthru ```Node``` for the current app UI. Expecting the router output or the **main \u003c...\u003e** of the application. \u003cbr /\u003e\u003cbr /\u003eConsider to include all custom wrappers for **\u003cLayout ...\u003e**, **\u003cNotifications ...\u003e** and others.  |\n\n#### Code sample\n\n\n##### Simple example - static\n\n```\n \u003cMupContent\u003e\n  \u003c...\u003e\n    \u003cReactRouter ... /\u003e                    // your app page/pages\n  \u003c/...\u003e\n \u003c/MupContent\u003e\n```\n\n---\n---\n---\n### TODO\n\n- todo: make callbacks clean right the GC","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frand0mc0d3r%2Fmaterial-ui-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frand0mc0d3r%2Fmaterial-ui-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frand0mc0d3r%2Fmaterial-ui-panel/lists"}