← All proposals

Model Selector

A new component built on the local MenuButton (trigger, popover, keyboard and focus behavior come from it).

Net-new componentOpen in Storybook

proposals/ModelSelector/custom.md28 lines · View on GitHub

Custom and net-new: ModelSelector

Everything in this proposal that is not plain PDS v2. npm run check:tokens reads this file: each net-new class, custom CSS variable and raw value found in the code must appear here in backticks.

Net-new components

  • .pds-model-selector — A new component built on the local MenuButton (trigger, popover, keyboard and focus behavior come from it).

Additions to existing PDS components

None.

Net-new props

All props of ModelSelectorProps are new (net-new component).

Custom CSS variables

  • --button-background-color — set on .pds-model-selector button.pds-button--subtle.pds-menu-button__trigger
  • --button-background-color-active — set on .pds-model-selector button.pds-button--subtle.pds-menu-button__trigger
  • --button-background-color-hover — set on .pds-model-selector button.pds-button--subtle.pds-menu-button__trigger
  • --button-foreground-color — set on .pds-model-selector button.pds-button--subtle.pds-menu-button__trigger
  • --button-foreground-color-hover — set on .pds-model-selector button.pds-button--subtle.pds-menu-button__trigger

Raw values kept on purpose

None.