Tooltip
Tooltips show contextual help or information about specific components when a user hovers or focuses on them.
| Property | Values | Default value | Required |
|---|---|---|---|
| label | text | - | |
| variant | neutral / informative / negative | neutral | |
| has icon | yes / no If the neutral variant, there is never an icon. | no | |
| max width | yes / no | no | no |
| placement | top / bottom / left / right | top | |
| should flip | yes / no | no | |
| offset | yes / no | no | no |
| container padding | yes / no | no | no |
{
"slug": "tooltip",
"$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
"$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/tooltip.json",
"title": "Tooltip",
"description": "Tooltips show contextual help or information about specific components when a user hovers or focuses on them.",
"meta": {
"category": "feedback",
"documentationUrl": "https://spectrum.adobe.com/page/tooltip/"
},
"type": "object",
"properties": {
"label": {
"type": "string"
},
"variant": {
"type": "string",
"enum": [
"neutral",
"informative",
"negative"
],
"default": "neutral"
},
"hasIcon": {
"type": "boolean",
"description": "If the neutral variant, there is never an icon.",
"default": false
},
"maxWidth": {
"type": "number",
"default": 160,
"description": "units: pixels"
},
"placement": {
"type": "string",
"enum": [
"top",
"bottom",
"left",
"right"
],
"default": "top"
},
"shouldFlip": {
"type": "boolean",
"default": false
},
"offset": {
"type": "number",
"default": 4,
"description": "units: pixels"
},
"containerPadding": {
"type": "number",
"default": 8,
"description": "units: pixels"
}
}
}