A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.
84
Build a user profile form component with properly associated labels and descriptions for accessibility.
Create a React form component that collects user profile information with the following fields:
Username field: A text input for entering a username, with a label "Username" and a description "Must be 3-20 characters long"
Email field: A text input for entering an email address, with a label "Email Address" and a description "We'll never share your email with anyone else"
Bio field: A textarea for entering a biography, with a label "Bio" and a description "Write a short bio about yourself (max 200 characters)"
Newsletter checkbox: A checkbox for opting into newsletters, with a label "Subscribe to newsletter" and a description "Receive weekly updates about new features"
The form should be fully accessible, with all labels and descriptions properly associated with their corresponding inputs using appropriate ARIA attributes. Do not manually manage IDs or ARIA attributes - the library should handle this automatically.
@generates
import React from 'react';
/**
* UserProfileForm component that renders an accessible form with properly
* associated labels and descriptions for all form fields.
*/
export function UserProfileForm(): JSX.Element;Provides accessible UI components with automatic label and description association.
Install with Tessl CLI
npx tessl i tessl/npm-headlessui--reactdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10