Introduction
Text columns display simple text based on the column’s state:Formatting the text
Date formatting
You can format date values using thedate(), dateTime(), and time() methods:
The PHP date format string.
Number formatting
You can format a column as a number usingnumeric():
The number of decimal places.
The locale for number formatting.
Money formatting
You can easily format money values:The currency code (e.g., ‘EUR’, ‘USD’).
Divide the value before formatting (useful for cents).
Customizing the appearance
Color
You may set a color for the text:The color name or a closure that returns a color.
Displaying as a badge
You can display text as a badge:Whether to display as a badge.
Adding an icon
Text columns may have an icon:The icon to display.
The position of the icon (Before or After).
The color of the icon.
Text size
You can customize the text size:ExtraSmall, Small, Medium, Large.
The text size.
Font weight
Customize the font weight:Thin, ExtraLight, Light, Medium, SemiBold, Bold, ExtraBold, Black.
The font weight.
Font family
You can change the font family:Sans, Serif, Mono.
The font family.
Working with lists
Listing multiple values
If your column state is an array, values will be comma-separated by default. You can display them on separate lines:Whether to display list items on separate lines.
Adding bullet points
You can add bullet points to list items:Limiting the list
Limit the number of values displayed:The maximum number of items to display.
Handling long text
Limiting text length
Limit the number of characters:The maximum number of characters.
The string to append when text is truncated.
Limiting word count
Limit the number of words:The maximum number of words.
Wrapping text
By default, text will not wrap. Enable wrapping:Line clamping
Limit text to a specific number of lines:The maximum number of lines to display.
Making text copyable
Allow users to copy text to clipboard:Whether the text should be copyable.
The message to display when copied.
How long to show the message (milliseconds).
Additional methods
Row index
Display the row index:Whether to start counting from zero.
Description
Add a description below the column content:The description text.
Position of the description (‘above’ or ‘below’).