You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renders an accessible label associated with controls.
14
+
15
+
<Showcasename="hero" />
16
+
17
+
This component is based on the native label element, it will automatically apply the correct labelling when wrapping controls or using the for attribute.
18
+
19
+
For your own custom controls to work correctly, ensure they use native elements such as button or input as a base.
20
+
21
+
## ✨ Features
22
+
23
+
<FeatureList
24
+
features={[
25
+
'Text selection is prevented when double clicking label.',
26
+
'Supports nested controls.',
27
+
]}
28
+
/>
29
+
30
+
## Building blocks
31
+
32
+
<CodeSnippetname="building-blocks" />
33
+
34
+
### 🎨 Anatomy
35
+
36
+
<AnatomyTable
37
+
propDescriptors={[
38
+
{
39
+
name: 'Label',
40
+
description: 'The root container for the label',
41
+
},
42
+
]}
43
+
/>
44
+
45
+
## Why use a headless label?
46
+
47
+
The Qwik UI headless label component keeps focus on the input when double clicking.
48
+
49
+
The native behavior will try to select and focus the text of the label. This is often times not the desired behavior.
50
+
51
+
{/* Not caught up to main, but would have an issues prop here from FeatureList */}
{/* TODO: Match docs conventions with the select, collapsible, or label. */}
53
28
54
29
## Accessibility
55
30
56
31
Adheres to the [progressbar role requirements](https://www.w3.org/WAI/ARIA/apg/patterns/meter/).
57
32
58
33
## API
59
34
60
-
### Root
35
+
### Progress
36
+
37
+
Contains all of the progress parts.
38
+
39
+
<APITable
40
+
propDescriptors={[
41
+
{
42
+
name: 'class',
43
+
type: 'string',
44
+
description: 'CSS classes to apply to the Progress.',
45
+
},
46
+
{
47
+
name: 'value',
48
+
type: 'number',
49
+
description: 'The progress value.',
50
+
},
51
+
{
52
+
name: 'max',
53
+
type: 'number',
54
+
description: 'The maximum progress value',
55
+
},
56
+
{
57
+
name: 'getValueLabel',
58
+
type: 'function',
59
+
description:
60
+
'A function to get the accessible label text representing the current value in a human-readable format. If not provided, the value label will be read as the numeric value as a percentage of the max value.',
0 commit comments