Error message
A red line that says what is missing, here when no tag is picked.
Add it to your project
Or install the packages yourselfTerminal
npm install @heroui/react
First time with HeroUI? Set it up once.
The code
*/
"use client";
import type {Key} from "@heroui/react";
import {Description, ErrorMessage, Label, Tag, TagGroup} from "@heroui/react";
import {useMemo, useState} from "react";
export default function ErrorMessageDemo() {
const [selected, setSelected] = useState<Iterable<Key>>(new Set());
const isInvalid = useMemo(() => Array.from(selected).length === 0, [selected]);
This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.
Changed for this site: A default export (HeroUI's docs use named ones).