auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "panel" 36 results closeClear
terminalCode Example
May 11, 2026

UIDecal Component - Render Razor UI as a Decal

A Render Component for s&box that allows you to project Razor UI onto surfaces as a Decal. Great for sticking UI onto rounded walls, curved surfaces, or any geo…

terminalCode Example
May 3, 2026

Razor Panel Structure and Syntax

Razor Panel Structure s&box uses Razor syntax for UI panels with files and optional stylesheets. Basic Panel Component File Structure The Element The element is…

codeAPI Reference
May 3, 2026

Sandbox.UI.Panel

Sandbox.UI.Panel Base class for UI panels. Overview Panel is the base class for all UI in s&box. Create panels using Razor (.razor) files or dynamically in code…

menu_bookDocumentation
May 20, 2026

Razor Panels: HTML/CSS UI with C# in s&box

s&box UI can be created using Razor syntax — web-like HTML/CSS combined with C#. Panels are not rendered via a HTML renderer; the syntax is a convenience layer …

menu_bookDocumentation
May 12, 2026

BuildHash pattern for Razor panel optimization

BuildHash Pattern for Razor Panel Optimization BuildHash is a method you can override in Razor panels to prevent unnecessary rebuilds when the underlying state …

terminalCode Example
May 12, 2026

s&box context menu with submenus and auto-positioning

s&box Context Menu with Submenus and Auto-Positioning This example shows a context menu system using s&box's Panel, Screen, and layout system with submenu build…

menu_bookDocumentation
May 20, 2026

Razor Panels: HTML/CSS UI with C# in s&box PanelComponent System

s&box Razor Panels use web-like HTML/CSS syntax with C# for UI creation. Panels are rendered natively (not via HTML renderer) — the syntax is a convenience laye…

codeAPI Reference
May 12, 2026

s&box IInspectorEditor: Custom inspector panels

IInspectorEditor Interface API Reference IInspectorEditor is an interface for custom inspector panels that can edit selected GameObjects in the s&box editor. Pa…

codeAPI Reference
May 12, 2026

s&box InspectorEditorAttribute: Registering inspector editors

InspectorEditorAttribute API Reference InspectorEditorAttribute is used to register a panel implementing IInspectorEditor with the inspector system. Type Signat…

terminalCode Example
May 5, 2026

WorldPanel and ScreenPanel — HUD overlays and 3D world-space UI with Razor PanelComponent

WorldPanel and ScreenPanel — UI in the World s&box UI uses (Razor) attached to either a (HUD overlay) or (3D world-space UI). The same component works with both…

menu_bookDocumentation
May 5, 2026

Razor Panels - s&box Documentation

Official s&box documentation for Razor Panels - the UI layout system. Razor Panels use a familiar HTML-like syntax with C# code-behind for building game interfa…

menu_bookDocumentation
May 5, 2026

Styling Panels - s&box UI Documentation

Styling Panels Style your UI panels using SCSS-like stylesheets or direct code styling. Using Stylesheets Create files alongside your files: Or specify a differ…

menu_bookDocumentation
May 3, 2026

Editor Widgets

Editor Widgets Build custom editor UI using Widgets (different from in-game Panels). Creating a Widget Widget as Window Widget as Child Dockable Widget Asset Ed…

menu_bookDocumentation
May 20, 2026

Styling Panels: SCSS, Inline Styles, and Code-Based Styling

s&box panels can be styled using SCSS stylesheets, inline styles, style blocks, or direct code manipulation. The styling system uses CSS-like syntax but is rend…

menu_bookDocumentation
May 20, 2026

Razor Components: Reusable UI Fragments with RenderFragment and Generics

Razor Components in s&box allow you to define reusable UI content that can be used inside other razor files. They make panels more agile and composable. Creatin…

menu_bookDocumentation
May 20, 2026

VirtualGrid: Virtualized Grid Panel for Large Item Collections

is a s&box UI Panel that virtualizes large item collections — only rendering visible cells. If you have thousands of items, it creates only the few on screen an…

menu_bookDocumentation
May 20, 2026

HudPainter: Immediate-Mode HUD Drawing in s&box

Each has a property (HudPainter) for immediate-mode drawing onto the screen. More efficient than UI panels since there's no layout, stylesheets, or interactivit…

terminalCode Example
May 12, 2026

Drag-and-drop system with static instance pattern

Drag-and-Drop System with Static Instance Pattern This example shows a drag-and-drop system using a static instance pattern for global state management and visu…

groupsCommunity
May 3, 2026

Performance Best Practices

s&box Performance Best Practices Community guide for writing performant s&box code based on engine behavior and developer recommendations. Object Pooling Avoid …

menu_bookDocumentation
May 5, 2026

Input - s&box Gameplay Documentation

Input s&box provides a comprehensive input system that handles keyboard, mouse, and gamepad input. The input system uses named actions defined in your project s…