Ask AI about this page
Text Component
Introduction
The text
component provides a simple and consistent way to display text content with proper styling and theme support, and serves as a foundational text element for consistent typography across your application.
Installation
Use the fluxtor artisan command to install the text
component easily:
php artisan fluxtor:install text
Basic Usage
This is a basic text component with default styling.
<x-ui.text> This is a basic text component with default styling. </x-ui.text>
Text Variations
Default Text
Standard text with default small size and neutral colors.
Perfect for body text, descriptions, and general content.
<x-ui.text> Standard text with default small size and neutral colors. </x-ui.text>
Custom Sized Text
Extra small text content
Default small text content
Base sized text content
Large sized text content
Extra large text content
<x-ui.text class="text-xs">Extra small text content</x-ui.text> <x-ui.text>Default small text content</x-ui.text> <x-ui.text class="text-base">Base sized text content</x-ui.text> <x-ui.text class="text-lg">Large text content</x-ui.text> <x-ui.text class="text-xl">Extra large text content</x-ui.text>
Styling Variations
Muted Text
Regular text content
Slightly muted text content
More muted text content
<x-ui.text>Regular text content</x-ui.text> <x-ui.text class="opacity-75">Slightly muted text content</x-ui.text> <x-ui.text class="opacity-50">More muted text content</x-ui.text>
Emphasized Text
Medium weight text
Semibold text
Italic text
Uppercase text
<x-ui.text class="font-medium">Medium weight text</x-ui.text> <x-ui.text class="font-semibold">Semibold text</x-ui.text> <x-ui.text class="italic">Italic text</x-ui.text> <x-ui.text class="uppercase tracking-wide">Uppercase text</x-ui.text>
Component Props
Prop Name | Type | Default | Required | Description |
---|---|---|---|---|
class |
string | '' |
No | Additional CSS classes |
Default Styles
The text component comes with these default styles:
- Color:
text-neutral-950
(dark) /text-neutral-50
(light mode) - Size:
text-sm
(small text)