React
LoadingLoading React…
No event yet
Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.
CompareInputs
The same example, live in each framework. One core underneath, so they should behave the same.
Loading React…
No event yet
Loading Vue…
No event yet
Loading Svelte…
No event yet
Loading Solid…
No event yet
Loading Angular…
No event yet
The attributes each framework puts on the open popup, read from the page.
| Attribute | React | Vue | Svelte | Solid | Angular |
|---|---|---|---|---|---|
role | Closed | Closed | Closed | Closed | Closed |
aria-modal | Closed | Closed | Closed | Closed | Closed |
aria-labelledby | Closed | Closed | Closed | Closed | Closed |
data-open | Closed | Closed | Closed | Closed | Closed |
Nothing open. Open a tile to fill its column.
Each tile sets modal to false, so five popups can be open at once; that is why aria-modal reads absent.
Each tile above runs this file.
import { Combobox } from '@hamur/react/combobox'
const fruits = ['Apple', 'Banana', 'Cherry', 'Grape', 'Lemon', 'Mango', 'Orange', 'Peach', 'Pear']
export default function ComboboxExample() {
return (
<Combobox.Root items={fruits}>
<label className="field">
<span className="select-label">Choose a fruit</span>
<Combobox.InputGroup className="combobox">
<Combobox.Input className="combobox-input" placeholder="e.g. Apple" />
<Combobox.Clear
className="combobox-button"
aria-label="Clear selection"
>
×
</Combobox.Clear>
<Combobox.Trigger
className="combobox-button"
aria-label="Open popup"
>
<Combobox.Icon className="select-icon" />
</Combobox.Trigger>
</Combobox.InputGroup>
</label>
<Combobox.Portal>
<Combobox.Positioner className="select-positioner" sideOffset={6}>
<Combobox.Popup className="select-popup combobox-popup">
<Combobox.Empty className="combobox-empty">
No fruits found.
</Combobox.Empty>
<Combobox.List className="select-list">
<Combobox.Collection>
{(fruit: string) => (
<Combobox.Item
key={fruit}
value={fruit}
className="select-item"
>
<Combobox.ItemIndicator
className="select-item-indicator"
>
✓
</Combobox.ItemIndicator>
<span className="select-item-text">{fruit}</span>
</Combobox.Item>
)}
</Combobox.Collection>
</Combobox.List>
</Combobox.Popup>
</Combobox.Positioner>
</Combobox.Portal>
</Combobox.Root>
)
}
The frameworks against each other only, on the same machine and the same example.
| Framework | Tests | Size | Open | Close | Memory |
|---|---|---|---|---|---|
| React | 2,150 | 63.7 KiB | 5.10 ms | 18.0 ms | 0.99 MiB |
| Vue | 2,147 | 60.5 KiB | 5.50 ms | 17.9 ms | 2.39 MiB |
| Svelte | 2,138 | 64.4 KiB | 10.4 ms | 18.1 ms | 2.51 MiB |
| Solid | 2,138 | 63.1 KiB | 4.70 ms | 17.9 ms | 0.71 MiB |
| Angular | 1,911 | 69.6 KiB | 6.40 ms | 18.5 ms | 0.79 MiB |
Size is the gzip of the component's entry with core and dom. Open, Close and Memory are medians in Chromium 156 on Apple M3 Max, 35 runs per framework; Memory is what one open and close leaves on the heap. Tests are Combobox's passing tests in each framework's suites. [N] is a value not measured yet.
The Combobox.Root names in each framework's own syntax.
| Prop | React | Vue | Svelte | Solid | Angular |
|---|---|---|---|---|---|
| name | name | name | name | name | [name] |
| defaultValue | defaultValue | default-value | defaultValue | defaultValue | [defaultValue] |
| value | value | value | value | value | [value] |
| onValueChangeevent | onValueChange | @value-change | onValueChange | onValueChange | (valueChange) |
| defaultInputValue | defaultInputValue | default-input-value | defaultInputValue | defaultInputValue | [defaultInputValue] |
| inputValue | inputValue | input-value | inputValue | inputValue | [inputValue] |
| onInputValueChangeevent | onInputValueChange | @input-value-change | onInputValueChange | onInputValueChange | (inputValueChange) |
| defaultOpen | defaultOpen | default-open | defaultOpen | defaultOpen | [defaultOpen] |
| open | open | open | open | open | [open] |
| onOpenChangeevent | onOpenChange | @open-change | onOpenChange | onOpenChange | (openChange) |
| autoHighlight | autoHighlight | auto-highlight | autoHighlight | autoHighlight | [autoHighlight] |
| highlightItemOnHover | highlightItemOnHover | highlight-item-on-hover | highlightItemOnHover | highlightItemOnHover | [highlightItemOnHover] |
| actionsRef | actionsRef | actions-ref | actionsRef | actionsRef | [actionsRef] |
| autoComplete | autoComplete | auto-complete | autoComplete | autoComplete | [autoComplete] |
| filter | filter | filter | filter | filter | [filter] |
| filteredItems | filteredItems | filtered-items | filteredItems | filteredItems | [filteredItems] |
| form | form | form | form | form | [form] |
| grid | grid | grid | grid | grid | [grid] |
| inline | inline | inline | inline | inline | [inline] |
| isItemEqualToValue | isItemEqualToValue | is-item-equal-to-value | isItemEqualToValue | isItemEqualToValue | [isItemEqualToValue] |
| itemToStringLabel | itemToStringLabel | item-to-string-label | itemToStringLabel | itemToStringLabel | [itemToStringLabel] |
| itemToStringValue | itemToStringValue | item-to-string-value | itemToStringValue | itemToStringValue | [itemToStringValue] |
| items | items | items | items | items | [items] |
| limit | limit | limit | limit | limit | [limit] |
| locale | locale | locale | locale | locale | [locale] |
| loopFocus | loopFocus | loop-focus | loopFocus | loopFocus | [loopFocus] |
| modal | modal | modal | modal | modal | [modal] |
| multiple | multiple | multiple | multiple | multiple | [multiple] |
| onItemHighlightedevent | onItemHighlighted | @item-highlighted | onItemHighlighted | onItemHighlighted | (itemHighlighted) |
| onOpenChangeCompleteevent | onOpenChangeComplete | @open-change-complete | onOpenChangeComplete | onOpenChangeComplete | (openChangeComplete) |
| openOnInputClick | openOnInputClick | open-on-input-click | openOnInputClick | openOnInputClick | [openOnInputClick] |
| virtualized | virtualized | virtualized | virtualized | virtualized | [virtualized] |
| disabled | disabled | disabled | disabled | disabled | [disabled] |
| readOnly | readOnly | read-only | readOnly | readOnly | [readOnly] |
| required | required | required | required | required | [required] |
| inputRef | inputRef | input-ref | inputRef | inputRef | [inputRef] |
| id | id | id | id | id | [id] |
| children | children | #default | children | children | ng-content |
| isItemDisabled | isItemDisabled | is-item-disabled | isItemDisabled | isItemDisabled | [isItemDisabled] |