Socket
Book a DemoInstallSign in
Socket

qwik-select-fixed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qwik-select-fixed

Create a reusable Qwik component library

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

qwik-select

A select/autocomplete component for Qwik apps.

You can use the built-in unstyled component or build your own UI component with the core hook.

  • Single select
  • Multi-select
  • Typeahead
  • Async support (dynamically fetching data)
  • Zero dependencies

Installation

  npm install qwik-select

Usage

import { component$, useStyles$, useStore } from "@builder.io/qwik";
import { Select } from "qwik-select";
import styles from "qwik-select/style.css?inline";

export default component$(() => {
  const state = useStore({
    items: ["One", "Two", "Three", "Four", "Five"],
    selectedItem: undefined,
  });

  useStyles$(styles);
  return (
    <div>
      <Select
        options={state.items}
        value={state.selectedItem}
        onSelect$={(it) => (state.selectedItem = it)}
        onClear$={() => (state.selectedItem = undefined)}
      />
    </div>
  );
});

See the documentation for more examples.

Acknowledgements

License

MIT

FAQs

Package last updated on 27 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts