- Implementation
- Text Props
Common Examples
To use theText, import it from @servicetitan/anvil2-ai-kit and pass a required text prop. The kit forbids children. text must be HTML phrasing content: inline nodes only, not block elements.text when both a raw HTML element and a kit component exist: Link over <a>, kit icons over raw <svg>.For truncation with Show more / Show less, use TruncatedText.Headline
Setvariant="headline" and a required el ("h1"–"h6") so the semantic level is independent of visual size. Headline size defaults to "major".Body
Body is the default variant and renders a<p>. Size defaults to "regular".Inline body
Setinline on body text to render a <span> instead of a <p> so fragments compose inside other text.Eyebrow
Eyebrow text always renders a<span> and does not accept size, el, or inline.Highlighted
Sethighlighted to apply the suggested-change treatment on any variant.React Accessibility
- Choose
elon headlines to match document structure, not visual size. - Body
textthat includes interactive children such asLinkmust stay phrasing content so the wrapping<p>or<span>remains valid HTML.