Info hint
An always-visible "i" that reveals a short explanation on hover, focus or tap. Use it instead of a native title attribute.
Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. Pages vs components
Works with Dolfin’s SDK context, with appearance and behaviour you can customise. Requires DolfinProvider.
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/base-info-hintAlso installs: ui-base-info-hint.
Usage
import { InfoHint } from "@/components/dolfin/base/info-hint";
// Place it anywhere inside your <DolfinProvider>.
<InfoHint children={children} label={label} />Renders inside DolfinProvider (set it up once). It renders the data you pass as props.
API reference
| Prop | Type | Description |
|---|---|---|
children required | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | The explanation. A sentence or two; anything longer belongs on the page. |
label required | string | Names what is being explained, for screen readers: "Automated" reads "More about Automated". |
side | "top" | "right" | "bottom" | "left" | |
className | string |
Customisation
Without editing the source, you can change:
- Class names
className- Messages
base.infoHint
Or edit the installed file directly: it is your code. See theming for colours and fonts.
Hooks
The SDK hooks this component uses. Use them directly from @dolfinai/react to build your own version.
useMessagesFiles
Written to your app by the install command:
components/dolfin/base/info-hint.tsx21 lines