BetaPublic beta — Read the release notes
Documentation

Select

Basic select example demonstrating core behavior.

Package
@solidiom/select
Version
0.0.1-next.0
Status
stable

Examples

import * as Select from "@solidiom/select"

;<Select.Root>Select content</Select.Root>
View source
        export function SelectExample(props: SelectExampleProps) {
  const copy = () => COPY[props.locale]

  return (
    <div ref={(el) => el.setAttribute("data-hydrated", "true")} class="select-example">
      <Select.Root>
        <Select.Trigger aria-label={copy().label}>
          <Select.Value placeholder={copy().label} />
        </Select.Trigger>
        <Select.Content>
          {copy().items.map((item) => (
            <Select.Item value={item.toLowerCase()}>{item}</Select.Item>
          ))}
        </Select.Content>
      </Select.Root>
    </div>
  )
}