diff --git a/components/Button.jsx b/components/Button.jsx
index 21594c6..6e0a7ef 100644
--- a/components/Button.jsx
+++ b/components/Button.jsx
@@ -1,6 +1,7 @@
const { React, getModule, i18n: { Messages } } = require('powercord/webpack');
-const { ContextMenu } = require('powercord/components');
-const { camelCaseify, findInReactTree } = require('powercord/util');
+const ContextMenu = require('../modules/PowerCord-libs/components/ContextMenu');
+const { findInReactTree } = require('powercord/util');
+const camelCaseify = require('../modules/PowerCord-libs/util/camelCaseify');
const getDefaultSaveDir = require('../utils/getDefaultSaveDir');
const buttonStructure = require('../structures/button');
diff --git a/modules/PowerCord-libs/components/ContextMenu.jsx b/modules/PowerCord-libs/components/ContextMenu.jsx
new file mode 100644
index 0000000..8ba66b4
--- /dev/null
+++ b/modules/PowerCord-libs/components/ContextMenu.jsx
@@ -0,0 +1,176 @@
+const { React, getModule, contextMenu: { closeContextMenu } } = require('powercord/webpack');
+const { getOwnerInstance, waitFor } = require('powercord/util');
+
+class ContextMenu extends React.PureComponent {
+ constructor (props) { // @todo: deprecate this
+ super(props);
+ this.state = {};
+ }
+
+ static renderRawItems (items) {
+ const cm = new ContextMenu();
+ const res = cm.renderItems(items, {
+ standalone: true,
+ depth: 0,
+ group: 0,
+ i: 0
+ });
+ return res;
+ }
+
+ render () {
+ if (this.props.items) { // Just assume we're rendering just a simple part of a context menu
+ return this.renderItems(this.props.items, {
+ depth: 0,
+ group: 0,
+ i: 0
+ });
+ }
+
+ const { default: Menu, MenuGroup } = getModule([ 'MenuGroup' ], false);
+ return (
+
+ );
+ }
+
+ renderItems (items, ctx) {
+ return items.map(item => {
+ ctx.i++;
+ switch (item.type) {
+ case 'button':
+ return this.renderButton(item, ctx);
+
+ case 'checkbox':
+ return this.renderCheckbox(item, ctx);
+
+ case 'slider':
+ return this.renderSlider(item, ctx);
+
+ case 'submenu':
+ return this.renderSubMenu(item, ctx);
+
+ default:
+ return null;
+ }
+ });
+ }
+
+ renderButton (item, ctx) {
+ const { MenuItem } = getModule([ 'MenuGroup' ], false);
+ return (
+