You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/schemas/docs/03-infolists/02-text.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -524,7 +524,7 @@ TextEntry::make('tags')
524
524
525
525
<UtilityInjectionset="infolistEntries"version="4.x">As well as allowing a static value, the `separator()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
526
526
527
-
###Customizing the text size
527
+
## Customizing the text size
528
528
529
529
Text columns have small font size by default, but you may change this to `TextSize::ExtraSmall`, `TextSize::Medium`, or `TextSize::Large`.
530
530
@@ -540,7 +540,7 @@ TextEntry::make('title')
540
540
541
541
<AutoScreenshotname="infolists/entries/text/large"alt="Text entry in a large font size"version="4.x" />
542
542
543
-
###Customizing the font weight
543
+
## Customizing the font weight
544
544
545
545
Text entries have regular font weight by default, but you may change this to any of the following options: `FontWeight::Thin`, `FontWeight::ExtraLight`, `FontWeight::Light`, `FontWeight::Medium`, `FontWeight::SemiBold`, `FontWeight::Bold`, `FontWeight::ExtraBold` or `FontWeight::Black`.
Copy file name to clipboardexpand all lines: packages/schemas/docs/05-primes/02-text.md
+70-3
Original file line number
Diff line number
Diff line change
@@ -57,10 +57,25 @@ Text::make('Information')
57
57
->color('info')
58
58
```
59
59
60
-
<UtilityInjectionset="infolistEntries"version="4.x">As well as allowing a static value, the `color()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
60
+
<UtilityInjectionset="primeComponents"version="4.x">As well as allowing a static value, the `color()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
61
61
62
62
<AutoScreenshotname="primes/text/color"alt="Text in the info color"version="4.x" />
63
63
64
+
### Using a neutral color
65
+
66
+
By default, the text color is set to `gray`, which is typically fairly dim against its background. You can darken it using the `color('neutral')` method:
67
+
68
+
```php
69
+
use Filament\Schemas\Components\Text;
70
+
71
+
Text::make('Modifying these permissions may give users access to sensitive information.')
72
+
73
+
Text::make('Modifying these permissions may give users access to sensitive information.')
74
+
->color('neutral')
75
+
```
76
+
77
+
<AutoScreenshotname="primes/text/neutral"alt="Text in the neutral color"version="4.x" />
78
+
64
79
## Displaying as a "badge"
65
80
66
81
By default, text is quite plain and has no background color. You can make it appear as a "badge" instead using the `badge()` method. A great use case for this is with statuses, where may want to display a badge with a [color](#customizing-the-color) that matches the status:
@@ -85,9 +100,9 @@ Text::make('Warning')
85
100
->badge(FeatureFlag::active())
86
101
```
87
102
88
-
<UtilityInjectionset="infolistEntries"version="4.x">As well as allowing a static value, the `badge()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
103
+
<UtilityInjectionset="primeComponents"version="4.x">As well as allowing a static value, the `badge()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
89
104
90
-
### Adding an icon to a badge
105
+
### Adding an icon to the badge
91
106
92
107
You may add other things to the badge, like an [icon](../../styling/icons):
93
108
@@ -102,3 +117,55 @@ Text::make('Warning')
102
117
```
103
118
104
119
<AutoScreenshotname="primes/text/badge-icon"alt="Text as badge with an icon"version="4.x" />
120
+
121
+
## Customizing the text size
122
+
123
+
Text columns have small font size by default, but you may change this to `TextSize::ExtraSmall`, `TextSize::Medium`, or `TextSize::Large`.
124
+
125
+
For instance, you may make the text larger using `size(TextSize::Large)`:
126
+
127
+
```php
128
+
use Filament\Schemas\Components\Text;
129
+
use Filament\Support\Enums\TextSize;
130
+
131
+
Text::make('Modifying these permissions may give users access to sensitive information.')
132
+
->size(TextSize::Large)
133
+
```
134
+
135
+
<AutoScreenshotname="primes/text/large"alt="Text entry in a large font size"version="4.x" />
136
+
137
+
## Customizing the font weight
138
+
139
+
Text entries have regular font weight by default, but you may change this to any of the following options: `FontWeight::Thin`, `FontWeight::ExtraLight`, `FontWeight::Light`, `FontWeight::Medium`, `FontWeight::SemiBold`, `FontWeight::Bold`, `FontWeight::ExtraBold` or `FontWeight::Black`.
140
+
141
+
For instance, you may make the font bold using `weight(FontWeight::Bold)`:
142
+
143
+
```php
144
+
use Filament\Schemas\Components\Text;
145
+
use Filament\Support\Enums\FontWeight;
146
+
147
+
Text::make('Modifying these permissions may give users access to sensitive information.')
148
+
->weight(FontWeight::Bold)
149
+
```
150
+
151
+
<UtilityInjectionset="primeComponents"version="4.x">As well as allowing a static value, the `weight()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
152
+
153
+
<AutoScreenshotname="primes/text/bold"alt="Text entry in a bold font"version="4.x" />
154
+
155
+
## Customizing the font family
156
+
157
+
You can change the text font family to any of the following options: `FontFamily::Sans`, `FontFamily::Serif` or `FontFamily::Mono`.
158
+
159
+
For instance, you may make the font monospaced using `fontFamily(FontFamily::Mono)`:
160
+
161
+
```php
162
+
use Filament\Support\Enums\FontFamily;
163
+
use Filament\Schemas\Components\Text;
164
+
165
+
Text::make('28o.-AK%D~xh*.:[4"3)zPiC')
166
+
->fontFamily(FontFamily::Mono)
167
+
```
168
+
169
+
<UtilityInjectionset="primeComponents"version="4.x">As well as allowing a static value, the `fontFamily()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
170
+
171
+
<AutoScreenshotname="primes/text/mono"alt="Text entry in a monospaced font"version="4.x" />
0 commit comments