|
| 1 | +--- |
| 2 | +title: Qwik UI | Dropdown |
| 3 | +--- |
| 4 | + |
| 5 | +import { FeatureList } from '~/components/feature-list/feature-list'; |
| 6 | +import { statusByComponent } from '~/_state/component-statuses'; |
| 7 | + |
| 8 | +<StatusBanner status={statusByComponent.headless.Select} /> |
| 9 | + |
| 10 | +# Dropdown |
| 11 | + |
| 12 | +Customizable popover menu. |
| 13 | + |
| 14 | +<Showcase name="hero" /> |
| 15 | + |
| 16 | +## Anatomy |
| 17 | + |
| 18 | +<AnatomyTable |
| 19 | + propDescriptors={[ |
| 20 | + { |
| 21 | + name: 'Dropdown.Root', |
| 22 | + description: |
| 23 | + 'Defines the component boundary and exposes its internal logic. Must wrap over all other parts.', |
| 24 | + }, |
| 25 | + { |
| 26 | + name: 'Dropdown.Trigger', |
| 27 | + description: |
| 28 | + 'Toggles the visibility of the dropdown menu. Should wrap around the button element.', |
| 29 | + }, |
| 30 | + { |
| 31 | + name: 'Dropdown.Popover', |
| 32 | + description: |
| 33 | + 'Container for the dropdown menu, responsible for positioning and visibility.', |
| 34 | + }, |
| 35 | + { |
| 36 | + name: 'Dropdown.Arrow', |
| 37 | + description: 'Optional arrow pointing from the trigger to the dropdown menu.', |
| 38 | + }, |
| 39 | + { |
| 40 | + name: 'Dropdown.Content', |
| 41 | + description: 'Contains the dropdown options and other interactive elements.', |
| 42 | + }, |
| 43 | + { |
| 44 | + name: 'Dropdown.Group', |
| 45 | + description: 'Groups multiple dropdown items under a common label.', |
| 46 | + }, |
| 47 | + { |
| 48 | + name: 'Dropdown.GroupLabel', |
| 49 | + description: 'Label for a group of dropdown items.', |
| 50 | + }, |
| 51 | + { |
| 52 | + name: 'Dropdown.Separator', |
| 53 | + description: |
| 54 | + 'Visual separator between different sections or groups of dropdown items.', |
| 55 | + }, |
| 56 | + { |
| 57 | + name: 'Dropdown.CheckboxItem', |
| 58 | + description: 'Dropdown item that includes a checkbox for multi-select options.', |
| 59 | + }, |
| 60 | + { |
| 61 | + name: 'Dropdown.ItemIndicator', |
| 62 | + description: 'Indicator that shows the selected state of an item.', |
| 63 | + }, |
| 64 | + { |
| 65 | + name: 'Dropdown.RadioGroup', |
| 66 | + description: 'Groups radio items, allowing only one to be selected at a time.', |
| 67 | + }, |
| 68 | + { |
| 69 | + name: 'Dropdown.RadioItem', |
| 70 | + description: |
| 71 | + 'Dropdown item that includes a radio button for single-select options within a radio group.', |
| 72 | + }, |
| 73 | + ]} |
| 74 | +/> |
| 75 | + |
| 76 | +{/* Need to create more examples - TBD */} |
| 77 | + |
| 78 | +## API |
| 79 | + |
| 80 | +### Dropdown.Root |
| 81 | + |
| 82 | +<AnatomyTable |
| 83 | + propDescriptors={[ |
| 84 | + { |
| 85 | + name: 'bind:open', |
| 86 | + description: |
| 87 | + 'Two-way data bind of the open state of the dropdown to a user-defined signal.', |
| 88 | + }, |
| 89 | + { |
| 90 | + name: 'onOpenChange$', |
| 91 | + description: |
| 92 | + 'Callback function that is triggered when the open state of the dropdown changes.', |
| 93 | + }, |
| 94 | + ]} |
| 95 | +/> |
0 commit comments