A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.
84
Build a modal dialog component that uses Headless UI's custom hooks for focus management, accessibility, and programmatic control.
Create a ModalManager component that displays a modal dialog with:
ActionButton component that uses the useClose hook to close the modal without prop drillingLabel and Description components with their corresponding hooks (useLabelledBy and useDescribedBy) to properly associate the modal title and descriptionThe modal should include:
Label componentDescription componentActionButton components (Cancel and Submit)aria-labelledby pointing to the titlearia-describedby pointing to the description@generates
/**
* A modal dialog manager with advanced focus management and accessibility
*/
export function ModalManager(): JSX.Element;
/**
* Action button component that can close the modal using hooks
*/
function ActionButton(props: ActionButtonProps): JSX.Element;
interface ActionButtonProps {
/** Button label text */
children: React.ReactNode;
/** Click handler for additional logic before closing */
onClick?: () => void;
/** Visual variant for the button */
variant?: 'primary' | 'secondary';
}Provides accessible UI components and custom hooks for React applications, including focus management, label/description associations, and component context utilities.
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