Text
JS behaviour
Text hero
The page headline whose letters spring into place — Persian and Arabic word by word, Latin letter by letter — with a slice of it on the brand gradient.
Real scenarios
The component as it is used in a product — not a specimen grid.
A secondary hero inside a card
align="start" and as="h2" — the card that opens the onboarding flow; the stickers frame the smaller title just the same.
Set up your workspace
2 minutes, no credit card.
The other direction, natively
راستبهچپ از همان خط اول
فارسی و عربی کلمهبهکلمه مینشینند تا حروف نچسبنده نمانند.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | '' | The headline itself; the accessible text stays whole and the animated copy is aria-hidden. |
| highlight | string | null | The slice of the title that takes the brand gradient; must be an exact substring of title. |
| subtitle | string | null | The supporting line under the title; pairs with the actions slot. |
| stickers | array | [] | Decorative stickers around the title: shape one of star · sparkle · heart · bolt · smiley · arrow, position one of top-start · top-end · bottom-start · bottom-end · start · end and tone one of accent · gold · violet · cyan · pink. |
| align | string | 'center' | With 'start' the block hugs the reading start — for heroes inside a card. |
| as | string | 'h1' | The heading level (h1 · h2 · …); use h2 for secondary heroes. |
Snippet
<x-nx::text-hero as="h1" title="با هر زبانی که میشناسی بنویس" highlight="هر زبانی"
subtitle="سلام · Bonjour · こんにちは — یک تیتر و همهٔ حروف با فنر سرِ جای خود مینشینند."
:stickers="[
['shape' => 'star', 'position' => 'top-start'],
['shape' => 'sparkle', 'position' => 'top-end'],
['shape' => 'heart', 'position' => 'bottom-end', 'tone' => 'pink'],
]">
<x-slot:actions>
<x-nx::button variant="primary" shape="pill" icon-end="arrow-right" wire:click="save">
شروع نوشتن
</x-nx::button>
<x-nx::button variant="ghost" shape="pill">نمونهها</x-nx::button>
</x-slot:actions>
</x-nx::text-hero>