mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
* 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
61 lines
No EOL
1.1 KiB
Text
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 /> |