templUI Pro coming soon  

50% OFF Join Waitlist

Label

Renders an accessible label associated with controls.

Source
TailwindCSS
Vanilla JS

Installation

  1. Install the component

    templui add label
  2. Add the JavaScript to your layout

    @label.Script()
    

    Call this template in your base layout file (e.g., in the <head> section).

Usage

The Label component enhances the following form controls:

API Reference

Required parameter
Hover for description

Label

Accessible label component for associating text with form controls.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
For
string
-
Error
string
-