# UI Toolkit Quick Reference
## Common VisualElement Types
### Input Controls
- `TextField` - Single/multi-line text input
- `IntegerField`, `FloatField`, `Vector3Field` - Numeric inputs
- `Toggle` - Boolean checkbox
- `Button` - Clickable button
- `Slider` - Value slider with optional input field
- `EnumField` - Dropdown for enum values
- `ObjectField` - Unity Object reference picker
### Layout Containers
- `VisualElement` - Generic container (like `
`)
- `ScrollView` - Scrollable area
- `Foldout` - Collapsible section
- `TwoPaneSplitView` - Resizable split panel
- `ListView` - Data-driven list with virtualization
### Display Elements
- `Label` - Text display
- `Image` - Sprite/Texture display
- `HelpBox` - Info/Warning/Error message box
- `ProgressBar` - Progress indicator
## USS Flexbox Layout
```css
.container {
flex-direction: row; /* or column */
justify-content: flex-start; /* flex-end, center, space-between */
align-items: stretch; /* flex-start, flex-end, center */
flex-grow: 1;
flex-shrink: 0;
}
```
## USS Common Properties
```css
/* Spacing */
margin: 10px;
padding: 5px 10px;
/* Sizing */
width: 200px;
height: 100px;
min-width: 50px;
max-height: 300px;
/* Background */
background-color: rgb(50, 50, 50);
background-image: url('path/to/image.png');
/* Border */
border-width: 1px;
border-color: rgba(255, 255, 255, 0.2);
border-radius: 4px;
/* Text */
color: rgb(200, 200, 200);
font-size: 14px;
-unity-font-style: bold; /* or italic */
-unity-text-align: middle-center;
```
## Query API Examples
```csharp
// By name (must set name in UXML)
var button = root.Q