Install the component from your command line.
Import the component.
Create your styled label component.
Contains the content for the label.
htmlfor attribute to connect the label with the input's id.
aria-labelledby attribute to your custom controls using the
useLabelContext hook to add support for label nesting.
Using this component with our primitives, will automatically get you the correct labelling using
aria-labelledby. You can also use the provided
useLabelContext hook to support this in your own controls.