# SbIconButton Icon-only button for toolbar actions, close buttons, and other compact interactions. Use **AriaLabel** (or **Title**) for accessibility when there is no visible text. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Icon | RenderFragment? | null | Icon content when set explicitly (e.g. `Icon="@(...)"`) | | ChildContent | RenderFragment? | null | Icon content when placed between tags. At least one of Icon or ChildContent should be set. | | AriaLabel | string? | null | Accessible label for screen readers (recommended for icon-only buttons) | | Variant | SbButtonVariant | Ghost | Button style variant (Solid, Outline, Ghost, Link) | | Size | SbSize | Md | Button size (Xs, Sm, Md, Lg, Xl) | | Color | SbColor | Default | Color intent (Default, Primary, Secondary, Success, Warning, Danger, Info, Muted) | | Disabled | bool | false | Whether the button is disabled | | Loading | bool | false | Whether the button shows a loading spinner | | Type | string | "button" | HTML button type (button, submit, reset) | | Title | string? | null | Tooltip text | | Class | string? | null | Additional CSS classes | | Style | string? | null | Inline styles | | AdditionalAttributes | Dictionary? | null | Additional HTML attributes (e.g. aria-*, data-*) | ## Events | Event | Type | Description | |-------|------|-------------| | OnClick | EventCallback | Fired when the button is clicked | ## Templates / Slots (RenderFragments) | Slot | Type | Description | |------|------|-------------| | Icon | RenderFragment? | Icon when set explicitly (e.g. `Icon="@(...)"`) | | ChildContent | RenderFragment? | Icon when placed between tags (default slot). Use either Icon or ChildContent. | ### Template Usage Examples #### Using ChildContent (content between tags) ```razor ``` #### Using Icon slot ```razor ``` ## CSS Classes - `sb-icon-button` - Base class - `sb-icon-button--solid` - Solid variant - `sb-icon-button--outline` - Outline variant - `sb-icon-button--ghost` - Ghost variant - `sb-icon-button--link` - Link variant - `sb-icon-button--xs` - Extra small size - `sb-icon-button--sm` - Small size - `sb-icon-button--md` - Medium size - `sb-icon-button--lg` - Large size - `sb-icon-button--xl` - Extra large size - `sb-icon-button--primary` - Primary color - `sb-icon-button--secondary` - Secondary color - `sb-icon-button--success` - Success color - `sb-icon-button--warning` - Warning color - `sb-icon-button--danger` - Danger color - `sb-icon-button--info` - Info color - `sb-icon-button--muted` - Muted color - `sb-icon-button--disabled` - Disabled state - `sb-icon-button--loading` - Loading state ## Accessibility - Uses native `