Skip to content

Text & badges

Display components render content and carry no interaction. Compose them inside a layout container.

Stack::make()->gap(Gap::Small)->schema([
Heading::make('Billing', 2),
Text::make('Invoices are sent on the first of each month.'),
Badge::make('Trialing'),
]);

Heading::make($text, $level) renders a heading; $level is 16 and defaults to 1. Call ->tooltip('…') to attach an ⓘ info popover next to it.

Heading::make('Billing', 2);

Text::make($text) renders a paragraph of muted prose. Tune it with enum-typed options (see the enums reference):

  • ->size(Size::…) — text size (Md by default).
  • ->color(Color::…) — color (Muted by default).
  • ->align(Align::Center) — alignment.
  • ->copyable() — render a copy-to-clipboard affordance.
Text::make('Invoices are sent on the first of each month.')->align(Align::Center);

Badge::make($label) renders a small status pill.

Badge::make('Trialing');

Icon::make($name) renders an icon from your app’s SVG sprite by name — a string, or a backed enum whose value is the name. Set ->size(Size::…), ->color(Color::…), or add classes with ->class('…').

Icon::make('check-circle')->color(Color::Success);

See Icons for how the sprite is built and how to add or type your own icon names.

RawBlock::make()->html($html) renders a string of HTML verbatim — an escape hatch for markup that has no dedicated component. ->blade($view, $data) renders a Blade view and uses its output instead.

RawBlock::make()->html('<p>Rendered from <strong>trusted</strong> server HTML.</p>');
RawBlock::make()->blade('components.legal-notice', ['year' => now()->year]);
RawBlock::make()->html('<p>Rendered from <strong>trusted</strong> server HTML.</p>');