Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Antonella's avatar

field text disable white-space: nowrap;

I have a field named NAME. which has several characters, and I wish it were more compact. Going to check the css of the name field I found these CSS rules:

.whitespace-no-wrap {
white-space: nowrap;
}

disabling this CSS rule I can get what I want.

now I define the NAME field in this way:

         Text::make('Name'),
	

is there a way to disable disable the option from here or i need to create a custom css?

0 likes
2 replies
WesleyAndMartin's avatar

I'm not sure if this will be the same for you, but you can add your own markup and bypassing the classes that are there by using the displayUsing method. Using your example you could do:

Text::make('Name')->displayUsing(
		fn($value) => $value
)->asHtml(),

Or

Text::make('Name')->displayUsing(
		fn($value) => '<div class="custom-class">' . $value . '</div>'
)->asHtml(),

I hope this helps and fits your use-case.

Please or to participate in this conversation.