Stay organized with collections
Save and categorize content based on your preferences.
A text label.
Usage
Returns
ui.Label(value, style, targetUrl, imageUrl)
ui.Label
Argument
Type
Details
value
String, optional
The text to display. Defaults to an empty string.
style
Object, optional
An object of allowed CSS styles with their values to be set for this widget. See style() documentation.
targetUrl
String, optional
The url to link to. Defaults to an empty string.
imageUrl
String, optional
Optional image url. If provided, the label will be rendered as an image and the value text will be shown on mouse hover. Only data: urls and icons loaded from gstatic.com are allowed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["Creates a text label UI element that can optionally display an image and link to a URL."],["Customization options include text value, CSS styling, target URL, and image URL."],["Image URLs are restricted to data URLs and icons from gstatic.com, displayed on hover with the text value as a tooltip."],["Default values are provided for optional arguments, resulting in an empty label with no styling or linking."]]],["The `ui.Label` function creates a text label with optional styling, a target URL, and an image. The `value` argument sets the displayed text, `style` customizes the CSS, `targetUrl` defines a link, and `imageUrl` displays an image with hover text. The text, style, URL, and image arguments are all optional and have default values. The label will only allow images from gstatic.com or data urls.\n"]]