carbon-components-svelte/docs/src/pages/components/Search.svx
Eric Liu db645c30f0
Align v10.35 (#694)
* chore(deps-dev): upgrade carbon-components to v10.35

* feat(tooltip-icon): add icon prop

This allows consumers to pass a Carbon icon as a prop instead of using the default slot.

* fix(tooltip): make screenreader description less verbose

Ref: b5f40d8fc

* feat(search): allow custom search icon

Allows consumers to render a different Carbon icon instead of the default Search16 icon.

* feat(number-input): add hideSteppers prop

Allows consumers to hide the input stepper buttons.

* feat: support expressive styles for Button, UnorderedList, OrderedList

* feat(button): support large size button

Set size to "lg" to use the large size.

* feat(button-skeleton): support xl, lg sizes

* docs(button): add "lg" size to expressive styles example

* feat(file-uploader-item): support field, small sizes

* feat(tooltip-icon): support disabled state
2021-06-26 07:13:28 -07:00

61 lines
No EOL
1.1 KiB
Text

<script>
import Query16 from "carbon-icons-svelte/lib/Query16";
import { Search } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
### Default
The `Search` component size is extra-large by default. There are [large](#large-size) and [small](#small-size) size variants.
<Search />
### Default value
<Search placeholder="Search catalog..." value="Cloud functions" />
### Reactive example
<FileSource src="/framed/Search/SearchReactive" />
### on:clear
The "clear" event is dispatched when clicking the "X" button in the search input element.
<Search value="Cloud functions" on:clear={() => console.log('clear')}/>
### Expandable variant
<Search expandable on:expand on:collapse />
### Light variant
<Search light />
### Large size
<Search size="lg" />
### Small size
<Search size="sm" />
### Disabled state
<Search disabled />
### Custom search icon
<Search icon={Query16} />
### Skeleton
<Search skeleton />
### Skeleton (large)
<Search size="lg" skeleton />
### Skeleton (small)
<Search size="sm" skeleton />