# SbText A versatile typography component for rendering text with various styles and semantic elements. Supports multiple variants, colors, and alignment options. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Variant | SbTextVariant | Body | Typography style variant | | Tag | string? | null | Override the semantic HTML tag | | Color | SbColor | Default | Text color | | Align | SbTextAlign | Start | Text alignment (Start, Center, End) | | Truncate | bool | false | Truncates text with ellipsis on overflow | | Class | string? | null | Additional CSS classes | | Style | string? | null | Inline styles | | AdditionalAttributes | Dictionary? | null | Additional HTML attributes | ## Text Variants | Variant | Default Tag | Description | |---------|-------------|-------------| | Body | `

` | Standard body text | | BodySmall | `

` | Smaller body text | | Caption | `` | Small caption text | | Overline | `` | Small uppercase text | | Code | `` | Monospace code text | ## Templates / Slots | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment? | Text content | ## CSS Classes - `sb-text` - Base class - `sb-text--body` - Body variant - `sb-text--bodysmall` - Small body variant - `sb-text--caption` - Caption variant - `sb-text--overline` - Overline variant - `sb-text--code` - Code variant - `sb-text--primary` - Primary color - `sb-text--secondary` - Secondary color - `sb-text--success` - Success color - `sb-text--warning` - Warning color - `sb-text--danger` - Danger color - `sb-text--align-center` - Center aligned - `sb-text--align-end` - End aligned - `sb-text--truncate` - Text truncation ## Examples ### Basic Variants ```razor This is regular body text for paragraphs and general content. This is smaller body text for secondary information. Caption text for labels and small annotations OVERLINE TEXT const value = "code"; ``` ### Colors ```razor Primary colored text Secondary colored text Success colored text Warning colored text Danger colored text ``` ### Text Alignment ```razor Left aligned text Center aligned text Right aligned text ``` ### Custom HTML Tag ```razor @* Render as a

instead of default tag *@ Content in a div element @* Render as a