# SbSurface
A low-level container component for creating elevated or outlined surfaces with customizable styling. Useful as a building block for custom components or when you need more control than SbCard provides.
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Elevation | int | 1 | Shadow depth level (0-5) |
| Outlined | bool | false | Adds a border instead of relying solely on elevation |
| Background | string? | null | Custom background color (CSS value) |
| BorderRadius | string? | null | Custom border radius (CSS value) |
| Padding | string? | null | Custom padding (CSS value) |
| Class | string? | null | Additional CSS classes |
## Templates / Slots
| Slot | Type | Description |
|------|------|-------------|
| ChildContent | RenderFragment? | Content to render inside the surface |
## CSS Classes
- `sb-surface` - Base class
- `sb-surface--elevation-0` through `sb-surface--elevation-5` - Shadow levels
## Examples
### Basic Surface
```razor
Content inside a surface
```
### Elevation Levels
```razor
Flat (no shadow)
Subtle shadow
Light shadow
Medium shadow
Strong shadow
Heavy shadow
```
### Outlined Surface
```razor
This surface has a border.
```
### Custom Background
```razor
Gray background surface
Using CSS variable for background
```
### Custom Border Radius
```razor
Rounded corners
Circle
```
### Custom Padding
```razor
Compact padding
Default-like padding
Spacious padding
Horizontal emphasis
```
### Combined Styling
```razor
Custom Surface
A fully customized surface component.
```
### Building Custom Components
```razor
@* Custom tooltip-like element *@
Tooltip content
@* Custom floating action panel *@
```
### Nested Surfaces
```razor
Outer Surface
Nested inner surface with different elevation
```
### Dashboard Widget
```razor
$12,450
```
### Comparison with SbCard
Use `SbSurface` when you need:
- More control over styling (background, radius, padding)
- A simpler container without header/footer structure
- Building blocks for custom components
Use `SbCard` when you need:
- Structured header/body/footer sections
- Clickable or linkable cards
- Standard card patterns