Add hideLabel prop to visually hide label

This commit is contained in:
metonym 2023-07-23 11:58:04 -07:00
commit 643dc3ab23
5 changed files with 64 additions and 35 deletions

View file

@ -11215,7 +11215,7 @@
{
"name": "labelText",
"kind": "let",
"description": "Specify the label text",
"description": "Specify the label text.\nAlternatively, use the \"labelText\" slot (e.g., <span slot=\"labelText\">...</span>)",
"type": "string",
"value": "\"\"",
"isFunction": false,
@ -11224,6 +11224,18 @@
"constant": false,
"reactive": false
},
{
"name": "hideLabel",
"kind": "let",
"description": "Set to `true` to visually hide the label text",
"type": "boolean",
"value": "false",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
"constant": false,
"reactive": false
},
{
"name": "name",
"kind": "let",

View file

@ -17,6 +17,10 @@ Set `fullWidth` to `true` for the slider to span the full width of its containin
<Slider labelText="Instances" fullWidth value={0} />
## Hidden label
<Slider labelText="Instances" hideLabel value={0} />
## Hidden text input
<Slider labelText="Instances" hideTextInput value={0} />