Handoff: Select
Rewritten 2026-11-20 against v2.0.0-beta.21 to the lessons template. Facts below were checked against Select.tsx, select.css, Select.stories.tsx and the beta.21 source in the reference checkout. Nothing was checked by eye in a session (no screenshots): how it looks, and any accessibility result, is "not checked".
What and why
An extension of the PDS Select with one new prop, variant: default (unchanged) or bare. Bare has no border, fill or container: the selected value and a chevron sit on the surface, secondary text at rest and default text on hover and while open. It exists for a picker that sits inline in a toolbar, first the model picker in the Composer. Choosing one value from a list is what the Select already does (listbox semantics, a check on the selected option, typeahead, keyboard handling); only the look was wrong for a toolbar. It replaces the earlier ModelSelector proposal, which was built on a menu button and is retired. Figma: Select page (the designer's hand-built SelectUtility component set; it does not show the bare variant by name). Context: context.md.
Exploration and decisions
- A variant of the Select, not a new component: a model picker is a Select without the container.
- Built as a thin wrapper around the published
Select(it adds the classpds-select--bareand turnsshowLabeloff), not a copy of its source: a copy needs local versions of six helpers the package does not export and about 600 lines of input styles, for a change that is CSS plus a class. The result for the port is the same. - Bare clears
border-colorandbackground-coloron the trigger wrapper, which keeps the Select's height and focus ring. State shows in the text color, not a fill. - The trigger hugs the selected value (first tried with
autoWidth, which left too much room); the list is as wide as its longest option. - Option descriptions and an
xssize from the old Model Selector were not carried over (one new prop was asked for). - The stories show only the bare variant;
defaultis the existing PDS Select.
Full list and reasons: decisions.md.
API
SelectProps is the published PDS SelectProps plus variant. Only variant is new; every other prop is the package's, unchanged.
| Prop | Type | Default | Purpose |
|---|---|---|---|
variant |
'bare' | 'default' |
'default' |
The look of the trigger. bare has no border, fill or container, forces showLabel to false (the label is still read by screen readers), and the trigger hugs the selected value (width: fit-content). |
Props the proposal touches without adding them:
| Prop | Package default | What bare does |
|---|---|---|
className |
none | Merged after pds-select--bare. |
showLabel |
true |
Ignored: the wrapper passes false for bare. |
autoWidth |
false |
Still works: the Select renders its hidden sizer, so the trigger is as wide as the longest option (what the proposal avoids). |
inputWidth |
none | Still works: the Select sets an inline width: 100% and max-width, which win over width: fit-content (from the code, not run). |
All Select props at beta.21, none of them changed by the proposal: autoWidth, className, defaultValue, disabled, footer, icon, id (required), inputWidth, inputWidthMin, label (required), labelStrings, message, onBlur, onFocus, onOptionSelect, options, required, showLabel, showSelectedIcon, size ('s' default, 'm'), tooltipText, validationMessage, validationStatus, value. options items take label, value, optional icon and disabled, or a group (groupLabel, options).
Variants and states: default, bare; sizes s and m; disabled; open; hover. Stories: Bare (with controls) and AllSizesAndStates. In the stories, select-story.css and the caption wrappers in AllSizesAndStates are story-only scaffolding (L9); the port drops them. The sample MODELS list is story data.
Tokens used
From select.css (as it is now):
--pds-color-foreground-default--pds-color-foreground-default-secondary--pds-spacing-2xs
Story only (select-story.css, not ported): --pds-color-foreground-default-secondary, --pds-spacing-2xs, --pds-spacing-l.
Inherited from the package Select and not changed: border, radius, height, focus ring, typography.
Impact
From impact.md (generated): no existing component is changed. The additions are opt-in: .pds-select--bare and its rules, which only apply where the class is added, so every existing Select is unaffected. No --pds-* token is redefined. impact.md lists AgentTree as the proposal that imports it; a grep also finds the bare Select in the Composer and Chat with an agent stories. Composer composes it, so port Select first.
Reused vs net-new
- Reused: the published PDS
Selectin full (behavior, markup and accessibility). Stand-in: the localmergeClasses(../_base/Button/utils). - Net-new:
.pds-select--bare(a modifier on.pds-select) and thevariantprop. No custom CSS variables and no raw values. Details incustom.md.
Accessibility
- Unchanged from the PDS Select: a labelled trigger (
aria-labelledby), listbox options, a check on the selected option, typeahead and keyboard handling. The proposal adds no markup. - Bare keeps the label for screen readers (the package adds
visually-hiddenwhenshowLabelis false) and the Select's own focus ring on the wrapper (the proposal clears only border and background). - Bare shows state by text color only (secondary to default). Contrast of secondary text on the surface at rest, on hover and while open, in light and dark: not checked.
tooltipTextand therequiredmarker render inside the label, and bare hides that label visually (still in the DOM). How they behave then: not checked; see Expect to change.- The a11y panel has not been run for this proposal, and light and dark were not checked by eye.
Decisions and open questions
Each has a recommendation.
- Name:
variant='bare'or another word (inline,ghost)? PDS has no precedent for a borderless field. Recommendation: keepbarefor the port, since the engineer renames freely; but see the flag question below. - Do option descriptions or an
xssize matter for the models list? Recommendation: no. Shipsandm; the model name is 14px in the compact bar. Addxsonly if the designer sees it is too large next to the other controls, as a separate change (L7). - Validation, message and tooltip on the bare look. In the code,
validationStatus,validationMessage,message,footer,tooltipTextandrequiredall still pass through to the package Select; bare does not hide or ignore them. Recommendation: leave them (the toolbar use does not set them) and add a dev warning in the port whenvariant='bare'is combined withvalidationStatusormessage, per the L2 pattern. Whether they look right on bare: not checked. - The list width rule. The list renders in a portal outside
.pds-select--bare, so the proposal reaches it withbody:has(.pds-select--bare .pds-select__input-wrapper[aria-expanded='true']) .pds-select__dropdown { min-width: max-content }. Recommendation: the port putspds-select__dropdown--bare(or the same modifier name) on the list and drops:has(). Not verified: the package sets an inlinemin-widthequal to the trigger width on the list through its dropdown hook (useDropdown, input variant), and an inline style beats a class rule, so the:has()rule may not be what widens the list; the list may be sized by its content instead. Test the bare list without the rule before adding a class for it.
Extension or new component
An extension of the PDS Select (src/components/inputs/Select/): one new prop, variant, and one new modifier class, pds-select--bare. The default look is the package Select untouched, and the proposal adds no stories for it; the existing PDS Select stories are unchanged. It is not a new component and not a fork: the proposal wraps the published Select instead of copying it.
Footprint
- Nothing is drawn outside the Select's box: no negative insets, no pseudo-elements, no overflow changes. The focus ring is the package's outline on the wrapper (
outline-offset: 0), as for the default Select. - Size: the root is
width: fit-contentwithmin-width: 0(the package root hasmin-width: 6.25rem), so a bare Select can be narrower than a default one. A parent that setswidth: 100%on its children, or a flex row that lets items shrink, can change this; the trigger text truncates with an ellipsis (package rule) when it is squeezed. - Height is the package's input height (
sis--pds-spacing-input-height-s,mis--pds-spacing-input-height-m); the cleared border is transparent, not removed, so the height does not change. Next to a button in a toolbar the heights may not match: not checked by eye. - The list is portalled to the body (a package behavior), so a clipping parent (
overflow) does not cut it. - Selector specificity: the
sandmsize padding rules in the package have the same specificity as.pds-select--bare .pds-select__input-wrapper, so the proposal'spadding-inlineonmdepends on which stylesheet loads last. Not verified; the port avoids it by putting the rules inselect.cssafter the size rules.
Dark mode and per-size values
Single look; there is no per-theme override in select.css. The tokens resolve per theme.
| Part | Size s |
Size m |
Theme |
|---|---|---|---|
| Trigger height | package (input-height-s, 2rem) |
package (input-height-m, 2.5rem) |
n/a |
| Inline padding (bare) | --pds-spacing-2xs (0.5rem) |
--pds-spacing-2xs (0.5rem) |
n/a (see the specificity note above for m) |
| Gap between value and chevron (bare) | --pds-spacing-2xs (0.5rem) |
--pds-spacing-2xs (0.5rem) |
n/a |
| Text and chevron at rest | --pds-color-foreground-default-secondary |
same | light and dark through the token; no override |
| Text and chevron on hover and open | --pds-color-foreground-default |
same | light and dark through the token; no override |
| Border and fill | transparent | transparent | n/a |
| Chevron size | package (1rem) | package (1.125rem) | n/a |
The package's own s and m values are not changed. Contrast in light and dark: not checked.
Expect to change
Each is a choice that may break a toolkit convention, with a recommended answer (L10).
variant: 'bare' | 'default'next to boolean flags (L2). The other Select options are booleans (autoWidth,showLabel), andbaresilently forcesshowLabelto false. Recommendation: keep one prop, but the engineer may prefer a flag (isBareorisInline) because there are only two values. Either way, document thatshowLabelis ignored and warn in development if it is set to true with bare.- A prop whose value forces another prop (L11).
baresetsshowLabelfalse andwidth: fit-content. Recommendation: say so in the Select docs, and keepautoWidthandinputWidthworking as they do (they do in the code today). - The
:has()list rule (L6). A workaround, as above. Recommendation: a class on the list, after testing whether the rule is needed. - Wrapper instead of editing the Select. Recommendation: edit the Select itself, as in Port notes.
- Nothing else breaks a convention that I found: no new required props, no unions beyond the string union, no screen-reader text in a nested object, no knob with one right value.
Target-version check
Checked against .pds-reference at v2.0.0-beta.21, the installed package and CHANGELOG.mdx:
variantonSelect: does not exist at beta.21 (the Select props have none). New..pds-select--bare, a bare modifier, andpds-select__dropdown--bare: not in the source CSS or in the package'sindex.css. New.- Already in beta.21 and relied on here:
showLabel,autoWidth,inputWidth,footer(added in an earlier beta, per the changelog),sizesandm,showSelectedIcon,tooltipText,validationStatus,validationMessage. mergeClassesexists in@libs/components/utils.- The changelog (through beta.21) has no entry for a borderless Select or a model picker.
Port notes
Changes the existing PDS Select (src/components/inputs/Select/): add variant: 'default' | 'bare' to its props, apply pds-select--bare (and showLabel off) in the component, add the .pds-select--bare rules to select.css, and put a bare-variant class on the dropdown list if the width rule is still needed. No generator needed. Differences from v2 to undo: the wrapper around the package Select (edit the Select itself), the local mergeClasses (use @libs/components/utils), and select-story.css (story scaffolding only).
Preview
npm run storybook, story Component Proposals / Select.
Figma: https://www.figma.com/design/AMGWJbraJoi2PKWnxo29Ah/PDS-Proposals?node-id=291-6855