- Implementation
- Link Props
Common Examples
To use theLink, import it from @servicetitan/anvil2-ai-kit and pass a required text prop. The kit forbids children; all content flows through typed props.href, React Aria renders a <span role="link">. For client-side routing, configure a React Aria RouterProvider at the app root so href is router-aware.New tab
Settarget="_blank" to open in a new tab. Link appends an open-in-new icon, defaults rel to "noopener noreferrer" unless you pass rel, and announces “(opens in a new tab)” to assistive technology.Inline in text
Link renders inline, so it wraps with surrounding copy. Nest it in Text through the text prop.Wrapping
Long labels wrap like any other inline text.Internationalization
Link uses the ai-kit.link.opensInNewTab message for the new-tab announcement. English is the default. Mount AiKitIntlProvider inside CartoTheme to switch locale or override that string without colliding with your app’s react-intl context.React Accessibility
- Every
Linkrequirestext, which is the visible label and accessible name. target="_blank"adds an “(opens in a new tab)” announcement and a presentational trailing icon.- Users activate a focused link with Enter.