Appearance
Function: text()
ts
function text(props: UiTextProps): Element;Defined in: src/UI/blocks/text.tsx:53
Text component for displaying static or dynamic text content.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | UiTextProps | Configuration object |
Returns
Element
Examples
Basic usage with static text
text({
text: 'Hello, World!'
});Usage with dynamic text from params with data and value
text({
text: ({data}) => `Welcome back, ${data.userName}!`
});Usage with info callout text
text({
text: ':::info\nThis is an informational message\n:::'
});Usage with warning callout text
text({
text: ':::warning\nThis is a warning message\n:::'
});Usage with callout followed by additional text
text({
text: ':::warning\nImportant notice\n:::\nAdditional instructions after the callout.'
});