menu refers to the return value of Menu:Create
RemoveComponent
Execute menu:RemoveComponent to remove a component via the Id.
Parameters
menu:RemoveComponent(id)| Name | Type | Description | Required |
|---|---|---|---|
| id | string | The id of the component | Yes |
Example
client/example.lua
local menu--[[Menu]] = Menu:Create('Title', 'Description', 'top-right', '#fff');
local placeholder = menu:AddPlaceholder('Placeholder');
menu:RemoveComponent(placeholder.id);
menu:FindComponent(placeholder.id)--[[nil]];