1.19.0 • Published 4 months ago

@strapi/ui-primitives v1.19.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Strapi Primitives

Version Downloads Discord Shield

A UI component library for building accessibile design systems & web apps.

While typically we use radix-ui primitives in our design-system, there are some missing components. To solve this issue, we work with Radix's internal packages & APIs to develop base layer primitives in a composable manor until they are (hopefully) released through Radix and we can deprecate them here.

Installation

yarn add @strapi/ui-primitives

# or

npm i @strapi/ui-primitives

Component Documentation

This directory shows a basic usage of the component, however for more details click on the storybook badge.

Combobox

npm.io

Basic Usage

import { Combobox } from '@strapi/ui-primitives';

() => {
  return (
    <Combobox.Root>
      <Combobox.Trigger>
        <Combobox.TextInput placeholder="Pick me" />
        <Combobox.Icon />
      </Combobox.Trigger>
      <Combobox.Portal>
        <Combobox.Content>
          <Combobox.Viewport>
            <Combobox.Item value="1">
              <Combobox.ItemText>Option 1</Combobox.ItemText>
              <Combobox.ItemIndicator>
                <Check />
              </Combobox.ItemIndicator>
            </Combobox.Item>
            <Combobox.NoValueFound>No value found</Combobox.NoValueFound>
            <Combobox.CreateItem>Create a new value</Combobox.CreateItem>
          </Combobox.Viewport>
        </Combobox.Content>
      </Combobox.Portal>
    </Combobox.Root>
  );
};

Select

npm.io

Basic Usage

import { Select } from '@strapi/ui-primitives';

() => {
  return (
    <Select.Root>
      <Select.Trigger>
        <Select.Value placeholder="Pick me" />
        <Select.Icon />
      </Select.Trigger>
      <Select.Portal>
        <Select.Content>
          <Select.Viewport>
            <Select.Item value="1">
              <Select.ItemText>Option 1</Select.ItemText>
              <Select.ItemIndicator>
                <Check />
              </Select.ItemIndicator>
            </Select.Item>
          </Select.Viewport>
        </Select.Content>
      </Select.Portal>
    </Select.Root>
  );
};

Contributing

Please follow our CONTRIBUTING guidelines.

License

Licensed under the MIT License, Copyright © 2022-present Strapi Solutions SAS.

See LICENSE for more information.

2.0.0-rc.17

4 months ago

2.0.0-rc.18

4 months ago

2.0.0-rc.15

4 months ago

2.0.0-rc.16

4 months ago

2.0.0-rc.13

7 months ago

2.0.0-rc.14

7 months ago

2.0.0-rc.12

7 months ago

1.19.0

1 year ago

2.0.0-rc.11

9 months ago

2.0.0-rc.10

9 months ago

2.0.0-beta.6

1 year ago

2.0.0-rc.7

12 months ago

2.0.0-beta.5

1 year ago

2.0.0-rc.8

11 months ago

2.0.0-rc.9

10 months ago

2.0.0-beta.4

1 year ago

2.0.0-beta.3

1 year ago

2.0.0-beta.2

1 year ago

2.0.0-beta.1

1 year ago

2.0.0-beta.0

1 year ago

1.18.0

1 year ago

1.17.0

1 year ago

1.16.0

1 year ago

1.15.0

1 year ago

1.14.1

1 year ago

1.14.0

1 year ago

1.13.2

2 years ago

1.13.1

2 years ago

1.12.2

2 years ago

1.13.0

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.8.2

2 years ago

1.9.0

2 years ago

1.8.1

2 years ago

1.10.0-alpha.0

2 years ago

1.11.0

2 years ago

1.10.1

2 years ago

0.0.0-622b91ef

2 years ago

1.10.0

2 years ago

1.8.0

2 years ago

0.0.0-3cf3ff39

2 years ago

1.7.3

2 years ago

1.7.9

2 years ago

1.7.10

2 years ago

1.7.8

2 years ago

1.7.7

2 years ago

1.7.6

2 years ago

1.7.5

2 years ago

1.7.4

2 years ago

1.7.4-alpha.0

2 years ago

1.7.2

2 years ago

1.7.2-alpha.0

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.7.0-alpha.5

2 years ago

1.7.0-alpha.4

2 years ago

1.7.0-alpha.3

2 years ago

1.7.0-alpha.2

2 years ago

1.7.0-alpha.1

2 years ago

1.7.0-alpha.0

2 years ago