Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Select with Helper Text Above Field for Ark UI

Priority Level, then Higher priority items will be processed first, then Select priority with Low, Medium, High, and Urgent.

Priority Level is the label. Next: Higher priority items will be processed first. The menu says Select priority. The list is Low, Medium, High, and Urgent.

Put the guidance here when people should read it before they open the list. Four fixed levels can also be a Segment Group. React with Ark UI does not rank the ticket.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Field anatomy: root, label, input, description, error

Usage

<Field className="max-w-md">
  <FieldLabel>Priority Level</FieldLabel>
  <FieldDescription>
    Higher priority items will be processed first.
  </FieldDescription>
  <Select collection={collection}>
    <SelectTrigger className="w-full">
      <SelectValue placeholder="Select priority" />
    </SelectTrigger>
    <SelectContent>
      <SelectGroup>
        {collection.items.map((item) => (
          <SelectItem item={item} key={item.value}>
            {item.label}
          </SelectItem>
        ))}
      </SelectGroup>
    </SelectContent>
  </Select>
</Field>

FAQ

Why is the helper text above the select?

FieldDescription sits between FieldLabel and Select. It reads Higher priority items will be processed first.

What shows before a priority is chosen?

The placeholder Select priority shows until an item is selected. It's the placeholder on SelectValue.

Which priorities are in the list?

The items are Low, Medium, High, and Urgent, each a SelectItem.

How does Priority Level connect to the select?

FieldLabel names the select. Field connects the two for you, with no ids to write. The label text is Priority Level.

Is this field a row?

No. orientation is unset, so the label, the description, and the trigger stack. max-w-md caps the width.

How do I move the sentence under the select?

Put FieldDescription after the Select. The placeholder can stay where it is.

API Reference

Field

No extra props in this demo. The rest is on the Field page.

Select

Sets collection={collection}, placeholder="Select priority" and item={item}. The rest is on the Select page.