Skip to content
On this page

Select

js
import Select from "@/components/Select";
const options = [
  { value: "1", text: "Web Application" },
  { value: "2", text: "Mobile Application" },
  { value: "3", text: "Desktop Application" },
  { value: "4", text: "Other" },
];
const Example = () => {
  return (
    <div>
      <Select
        name="pt"
        label="Project Type"
        options={options}
        placeholder="Select project type"
      />
    </div>
  );
};

TIP

You can use html select attribute via props. For example: name="pt", placeholder="Select project type" You can also use label props for label text.

Note

For label and select connection use name props. For Horizontal select use horizontal props.

COPYRIGHT © 2022 Codeshaper, All rights reserved.