`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ButtonSkeleton
-
-### Import path
-
-```js
-import { ButtonSkeleton } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :--------------------------------------------------- | :------------ | :-------------------------------------- |
-| href | string | -- | Set the `href` to use an anchor link. |
-| size | "default" | "field" | "small" | `"default"` | Specify the size of button skeleton. |
-| small | boolean | `false` | Set to `true` to use the small variant. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Checkbox
-
-### Import path
-
-```js
-import { Checkbox } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :------------ | :---------------------------------------- | :------------ | :------------------------------------------------- |
-| checked | boolean | `false` | Specify whether the checkbox is checked. |
-| indeterminate | boolean | `false` | Specify whether the checkbox is indeterminate. |
-| skeleton | boolean | `false` | Set to `true` to display the skeleton state. |
-| readonly | boolean | `false` | Set to `true` for the checkbox to be read-only. |
-| disabled | boolean | `false` | Set to `true` to disable the checkbox. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| name | string | `""` | Set a name for the input element. |
-| title | string | -- | Specify the title attribute for the label element. |
-| id | string | -- | Set an id for the input label. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-
-### Dispatched events
-
-- `on:check`
-
----
-
-## CheckboxSkeleton
-
-### Import path
-
-```js
-import { CheckboxSkeleton } from "carbon-components-svelte";
-```
-
-### Props
-
-No exported props.
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ClickableTile
-
-### Import path
-
-```js
-import { ClickableTile } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------- |
-| clicked | boolean | `false` | Set to `true` to click the tile. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| href | string | -- | Set the `href`. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:keydown`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## CodeSnippet
-
-### Import path
-
-```js
-import { CodeSnippet } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------------------- | :--------------------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------------- |
-| type | "single" | "inline" | "multi" | `"single"` | Set the type of code snippet. |
-| code | string | -- | Set the code snippet text. Alternatively, use the default slot (e.g. <CodeSnippet>{`code`}</CodeSnippet>). |
-| expanded | boolean | `false` | Set to `true` to expand a multi-line code snippet (type="multi"). |
-| hideCopyButton | boolean | `false` | Set to `true` to hide the copy button. |
-| wrapText | boolean | `false` | Set to `true` to wrap the text. Note that `type` must be "multi". |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| skeleton | boolean | `false` | Set to `true` to display the skeleton state. |
-| copyButtonDescription | string | -- | Specify the ARIA label for the copy button icon. |
-| copyLabel | string | -- | Specify the ARIA label of the copy button. |
-| feedback | string | `"Copied!"` | Specify the feedback text displayed when clicking the snippet. |
-| feedbackTimeout | number | `2000` | Set the timeout duration (ms) to display feedback text. |
-| showLessText | string | `"Show less"` | Specify the show less text. `type` must be "multi". |
-| showMoreText | string | `"Show more"` | Specify the show more text. `type` must be "multi". |
-| showMoreLess | boolean | `false` | Set to `true` to enable the show more/less button. |
-| id | string | -- | Set an id for the code element. |
-| ref | null | HTMLPreElement | `null` | Obtain a reference to the pre HTML element. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:animationend`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## CodeSnippetSkeleton
-
-### Import path
-
-```js
-import { CodeSnippetSkeleton } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :--------------------------------------------------- | :------------ | :---------------------------- |
-| type | "single" | "inline" | "multi" | `"single"` | Set the type of code snippet. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Column
-
-### Import path
-
-```js
-import { Column } from "carbon-components-svelte";
-```
-
-### Props
+### Types
```ts
-// `Column` type definitions
+export type BreakpointSize = "sm" | "md" | "lg" | "xlg" | "max";
-type ColumnSize = boolean | number;
+export type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584;
+```
-interface ColumnSizeDescriptor {
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------- |
+| sizes | No | let | Yes | Record | { sm: false, md: false, lg: false, xlg: false, max: false, } | Carbon grid sizes as an object |
+| size | No | let | Yes | BreakpointSize | undefined | Determine the current Carbon grid breakpoint size |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :------------------------------------------------------------------------------ | :------- |
+| -- | Yes | { size: BreakpointSize; sizes: Record; } | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :----------------------------------------------------------------------- |
+| change | dispatched | { size: BreakpointSize; breakpointValue: BreakpointValue; } |
+
+## `Button`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | HTMLButtonElement | null | Obtain a reference to the HTML element |
+| kind | No | let | No | "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger-tertiary" | "danger-ghost" | "primary" | Specify the kind of button |
+| size | No | let | No | "default" | "field" | "small" | "lg" | "xl" | "default" | Specify the size of button |
+| expressive | No | let | No | boolean | false | Set to `true` to use Carbon's expressive typesetting |
+| isSelected | No | let | No | boolean | false | Set to `true` to enable the selected state for an icon-only, ghost button |
+| icon | No | let | No | any | undefined | Specify the icon to render Alternatively, use the named slot "icon" (e.g., `<Icon slot="icon" size="{20}" />`) |
+| iconDescription | No | let | No | string | undefined | Specify the ARIA label for the button icon |
+| tooltipAlignment | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon. Only applies to icon-only buttons |
+| tooltipPosition | No | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the position of the tooltip relative to the icon |
+| as | No | let | No | boolean | false | Set to `true` to render a custom HTML element Props are destructured as `props` in the default slot (e.g., <Button let:props><div {...props}>...</div></Button>) |
+| skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the button |
+| href | No | let | No | string | undefined | Set the `href` to use an anchor link |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
+| type | No | let | No | string | "button" | Specify the `type` attribute for the button element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
+| -- | Yes | { props: { role: "button"; type?: string; tabindex: any; disabled: boolean; href?: string; class: string; [key: string]: any; } } | -- |
+| icon | No | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `ButtonSet`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------- |
+| stacked | No | let | No | boolean | false | Set to `true` to stack the buttons vertically |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+None.
+
+## `ButtonSkeleton`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------- | ---------------------- | ------------------------------------ |
+| href | No | let | No | string | undefined | Set the `href` to use an anchor link |
+| size | No | let | No | "default" | "field" | "small" | "lg" | "xl" | "default" | Specify the size of button skeleton |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `Checkbox`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | ------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| title | No | let | Yes | string | undefined | Specify the title attribute for the label element |
+| indeterminate | No | let | Yes | boolean | false | Specify whether the checkbox is indeterminate |
+| group | No | let | Yes | ReadonlyArray | undefined | Specify the bound group |
+| checked | No | let | Yes | boolean | false | Specify whether the checkbox is checked |
+| value | No | let | No | any | "" | Specify the value of the checkbox |
+| skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state |
+| required | No | let | No | boolean | false | Set to `true` to mark the field as required |
+| readonly | No | let | No | boolean | false | Set to `true` for the checkbox to be read-only |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the checkbox |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| name | No | let | No | string | "" | Set a name for the input element |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input label |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------- |
+| check | dispatched | boolean |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+
+## `CheckboxSkeleton`
+
+### Props
+
+None.
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `ClickableTile`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ---------------------- | ----------------------------------------- |
+| clicked | No | let | Yes | boolean | false | Set to `true` to click the tile |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the tile |
+| href | No | let | No | string | undefined | Set the `href` |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `CodeSnippet`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------------- | :------- | :--------------- | :------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLPreElement | null | Obtain a reference to the pre HTML element |
+| showMoreLess | No | let | Yes | boolean | true | Set to `false` to hide the show more/less button
NOTE: this prop only works with the `type="multi"` variant |
+| expanded | No | let | Yes | boolean | false | Set to `true` to expand a multi-line code snippet (type="multi") |
+| type | No | let | No | "single" | "inline" | "multi" | "single" | Set the type of code snippet |
+| code | No | let | No | string | undefined | Set the code snippet text. Alternatively, use the default slot (e.g., `<CodeSnippet>{code}</CodeSnippet>`).
NOTE: you _must_ use the `code` prop for the copy-to-clipboard functionality. |
+| copy | No | let | No | (code: string) => void | async (code) => { try { await navigator.clipboard.writeText(code); } catch (e) { console.log(e); } } | By default, this component uses `navigator.clipboard.writeText` API to copy text to the user's clipboard.
Provide a custom function to override this behavior. |
+| hideCopyButton | No | let | No | boolean | false | Set to `true` to hide the copy button |
+| disabled | No | let | No | boolean | false | Set to `true` for the disabled variant. Only applies to the "single", "multi" types |
+| wrapText | No | let | No | boolean | false | Set to `true` to wrap the text.
NOTE: this prop only works with the `type="multi"` variant |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state |
+| copyButtonDescription | No | let | No | string | undefined | Specify the ARIA label for the copy button icon |
+| copyLabel | No | let | No | string | undefined | Specify the ARIA label of the copy button |
+| feedback | No | let | No | string | "Copied!" | Specify the feedback text displayed when clicking the snippet |
+| feedbackTimeout | No | let | No | number | 2000 | Set the timeout duration (ms) to display feedback text |
+| showLessText | No | let | No | string | "Show less" | Specify the show less text.
NOTE: this prop only works with the `type="multi"` variant |
+| showMoreText | No | let | No | string | "Show more" | Specify the show more text
NOTE: this prop only works with the `type="multi"` variant |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the code element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------ |
+| -- | Yes | -- | {code} |
+
+### Events
+
+| Event name | Type | Detail |
+| :----------- | :--------- | :---------------- |
+| expand | dispatched | null |
+| collapse | dispatched | null |
+| copy | dispatched | null |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| animationend | forwarded | -- |
+
+## `CodeSnippetSkeleton`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------ | --------------------- | ---------------------------- |
+| type | No | let | No | "single" | "multi" | "single" | Set the type of code snippet |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `Column`
+
+### Types
+
+```ts
+export type ColumnSize = boolean | number;
+
+export interface ColumnSizeDescriptor {
span?: ColumnSize;
offset: number;
}
-type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
-```
-
-| Prop name | Type | Default value | Description |
-| :------------ | :------------------------------------------------------------------------------------------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| as | boolean | `false` | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Column let:props><article {...props}>...</article></Column>). |
-| noGutter | boolean | `false` | Set to `true` to remove the gutter. |
-| noGutterLeft | boolean | `false` | Set to `true` to remove the left gutter. |
-| noGutterRight | boolean | `false` | Set to `true` to remove the right gutter. |
-| aspectRatio | "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1" | -- | Specify the aspect ratio of the column. |
-| sm | ColumnBreakpoint | -- | Set the small breakpoint. |
-| md | ColumnBreakpoint | -- | Set the medium breakpoint. |
-| lg | ColumnBreakpoint | -- | Set the large breakpoint. |
-| xlg | ColumnBreakpoint | -- | Set the extra large breakpoint. |
-| max | ColumnBreakpoint | -- | Set the maximum breakpoint. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ComboBox
-
-### Import path
-
-```js
-import { ComboBox } from "carbon-components-svelte";
+export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
```
### Props
-```ts
-// `ComboBox` type definitions
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| as | No | let | No | boolean | false | Set to `true` to render a custom HTML element Props are destructured as `props` in the default slot (e.g., <Column let:props><article {...props}>...</article></Column>) |
+| noGutter | No | let | No | boolean | false | Set to `true` to remove the gutter |
+| noGutterLeft | No | let | No | boolean | false | Set to `true` to remove the left gutter |
+| noGutterRight | No | let | No | boolean | false | Set to `true` to remove the right gutter |
+| padding | No | let | No | boolean | false | Set to `true` to add top and bottom padding to the column |
+| aspectRatio | No | let | No | "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1" | undefined | Specify the aspect ratio of the column |
+| sm | No | let | No | ColumnBreakpoint | undefined | Set the small breakpoint |
+| md | No | let | No | ColumnBreakpoint | undefined | Set the medium breakpoint |
+| lg | No | let | No | ColumnBreakpoint | undefined | Set the large breakpoint |
+| xlg | No | let | No | ColumnBreakpoint | undefined | Set the extra large breakpoint |
+| max | No | let | No | ColumnBreakpoint | undefined | Set the maximum breakpoint |
-interface ComboBoxItem {
- id: string;
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :------------------------------------------------------------ | :------- |
+| -- | Yes | {props: { class: string; [key: string]: any; }} | -- |
+
+### Events
+
+None.
+
+## `ComboBox`
+
+### Types
+
+```ts
+export type ComboBoxItemId = any;
+
+export interface ComboBoxItem {
+ id: ComboBoxItemId;
text: string;
+ disabled?: boolean;
}
```
-| Prop name | Type | Default value | Description |
-| :--------------- | :---------------------------------------------------------- | :------------ | :------------------------------------------------------------------------ |
-| items | ComboBoxItem[] | `[]` | Set the combobox items. |
-| itemToString | (item: ComboBoxItem) => string | -- | Override the display of a combobox item. |
-| selectedIndex | number | -- | Set the selected item by value index. |
-| value | string | `""` | Specify the selected combobox value. |
-| size | "sm" | "xl" | -- | Set the size of the combobox. |
-| disabled | boolean | `false` | Set to `true` to disable the combobox. |
-| titleText | string | `""` | Specify the title text of the combobox. |
-| placeholder | string | `""` | Specify the placeholder text. |
-| helperText | string | `""` | Specify the helper text. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| open | boolean | `false` | Set to `true` to open the combobox menu dropdown. |
-| shouldFilterItem | (item: ComboBoxItem, value: string) => boolean | -- | Determine if an item should be filtered given the current combobox value. |
-| translateWithId | (id: any) => string | -- | Override the default translation ids. |
-| id | string | -- | Set an id for the list box component. |
-| name | string | -- | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
-| listRef | null | HTMLDivElement | `null` | Obtain a reference to the list HTML element. |
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------------------- | :------- | :-------------------- | :------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| listRef | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the list HTML element |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the combobox menu dropdown |
+| value | No | let | Yes | string | "" | Specify the selected combobox value |
+| selectedId | No | let | Yes | ComboBoxItemId | undefined | Set the selected item by value id |
+| items | No | let | No | ReadonlyArray | [] | Set the combobox items |
+| itemToString | No | let | No | (item: ComboBoxItem) => string | (item) => item.text || item.id | Override the display of a combobox item |
+| direction | No | let | No | "bottom" | "top" | "bottom" | Specify the direction of the combobox dropdown menu |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the combobox |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the combobox |
+| titleText | No | let | No | string | "" | Specify the title text of the combobox |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| placeholder | No | let | No | string | "" | Specify the placeholder text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| shouldFilterItem | No | let | No | (item: ComboBoxItem, value: string) => boolean | () => true | Determine if an item should be filtered given the current combobox value |
+| translateWithId | No | let | No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string | undefined | Override the chevron icon label based on the open state. Defaults to "Open menu" when closed and "Close menu" when open |
+| translateWithIdSelection | No | let | No | (id: "clearSelection") => string | undefined | Override the label of the clear button when the input has a selection. Defaults to "Clear selected item" since a combo box can only have on selection. |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
+| clear | No | function | No | (options?: { focus?: boolean; }) => void | () => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; value = ""; if (options?.focus !== false) ref?.focus(); } | Clear the combo box programmatically |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :-------------------------------------------------- | :-------------------------------- |
+| -- | Yes | { item: ComboBoxItem; index: number } | {itemToString(item)} |
+| titleText | No | -- | {titleText} |
-### Forwarded events
+### Events
-- `on:keydown`
-- `on:focus`
-- `on:blur`
-- `on:clear`
-- `on:scroll`
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------------------------------------------------------------- |
+| select | dispatched | { selectedId: ComboBoxItemId; selectedItem: ComboBoxItem } |
+| clear | dispatched | KeyboardEvent | MouseEvent |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
+| scroll | forwarded | -- |
-### Dispatched events
-
-- `on:select`
-
----
-
-## ComposedModal
-
-### Import path
-
-```js
-import { ComposedModal } from "carbon-components-svelte";
-```
+## `ComposedModal`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------------- | :---------------------------------------- | :----------------------------- | :--------------------------------------------------------------------- |
-| size | "xs" | "sm" | "lg" | -- | Set the size of the composed modal. |
-| open | boolean | `false` | Set to `true` to open the modal. |
-| danger | boolean | `false` | Set to `true` to use the danger variant. |
-| preventCloseOnClickOutside | boolean | `false` | Set to `true` to prevent the modal from closing when clicking outside. |
-| containerClass | string | `""` | Specify a class for the inner modal. |
-| selectorPrimaryFocus | string | `"[data-modal-primary-focus]"` | Specify a selector to be focused when opening the modal. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the top-level HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------------- | :------- | :--------------- | :------- | ----------------------------------------- | ----------------------------------------- | --------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the modal |
+| size | No | let | No | "xs" | "sm" | "lg" | undefined | Set the size of the composed modal |
+| danger | No | let | No | boolean | false | Set to `true` to use the danger variant |
+| preventCloseOnClickOutside | No | let | No | boolean | false | Set to `true` to prevent the modal from closing when clicking outside |
+| containerClass | No | let | No | string | "" | Specify a class for the inner modal |
+| selectorPrimaryFocus | No | let | No | null | string | "[data-modal-primary-focus]" | Specify a selector to be focused when opening the modal |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:transitionend`
+| Event name | Type | Detail |
+| :-------------------- | :--------- | :------------------------------ |
+| transitionend | dispatched | { open: boolean; } |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| submit | dispatched | null |
+| click:button--primary | dispatched | null |
+| close | dispatched | null |
+| open | dispatched | null |
-### Dispatched events
-
-- `on:submit`
-- `on:close`
-- `on:open`
-
----
-
-## Content
-
-### Import path
-
-```js
-import { Content } from "carbon-components-svelte";
-```
+## `Content`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :--------------- | :----------------------------------- |
-| id | string | `"main-content"` | Specify the id for the main element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------- | --------------------------- | ----------------------------------- |
+| id | No | let | No | string | "main-content" | Specify the id for the main element |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-No forwarded events.
+None.
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ContentSwitcher
-
-### Import path
-
-```js
-import { ContentSwitcher } from "carbon-components-svelte";
-```
+## `ContentSwitcher`
### Props
-| Prop name | Type | Default value | Description |
-| :------------ | :---------------------------- | :------------ | :----------------------------------------- |
-| selectedIndex | number | `0` | Set the selected index of the switch item. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| size | "sm" | "xl" | -- | Specify the size of the content switcher. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | ----------------------------- | ---------------------- | ----------------------------------------- |
+| selectedIndex | No | let | Yes | number | 0 | Set the selected index of the switch item |
+| size | No | let | No | "sm" | "xl" | undefined | Specify the size of the content switcher |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| change | dispatched | number |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-- `on:change`
-
----
-
-## Copy
-
-### Import path
-
-```js
-import { Copy } from "carbon-components-svelte";
-```
+## `ContextMenu`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :----------------------------------------- | :------------ | :------------------------------------------------------ |
-| feedback | string | `"Copied!"` | Set the feedback text shown after clicking the button. |
-| feedbackTimeout | number | `2000` | Set the timeout duration (ms) to display feedback text. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLUListElement | null | Obtain a reference to the unordered list HTML element |
+| y | No | let | Yes | number | 0 | Specify the vertical offset of the menu position |
+| x | No | let | Yes | number | 0 | Specify the horizontal offset of the menu position |
+| open | No | let | Yes | boolean | false | Set to `true` to open the menu Either `x` and `y` must be greater than zero |
+| target | No | let | No | null | ReadonlyArray | null | Specify an element or list of elements to trigger the context menu. If no element is specified, the context menu applies to the entire window |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:animationend`
+| Event name | Type | Detail |
+| :--------- | :--------- | :----------------------- |
+| open | dispatched | HTMLElement |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+| close | dispatched | null |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## CopyButton
-
-### Import path
-
-```js
-import { CopyButton } from "carbon-components-svelte";
-```
+## `ContextMenuDivider`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------ | :-------------------- | :------------------------------------------------ |
-| iconDescription | string | `"Copy to clipboard"` | Set the title and ARIA label for the copy button. |
+None.
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:click`
-- `on:animationend`
+None.
-### Dispatched events
-
-No dispatched events.
-
----
-
-## DataTable
-
-### Import path
-
-```js
-import { DataTable } from "carbon-components-svelte";
-```
+## `ContextMenuGroup`
### Props
-| Prop name | Type | Default value | Description |
-| :------------- | :----------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------- |
-| headers | { key: string; value: string; display?: (item) => string; sort?: (a, b) => number; empty?: boolean; columnMenu?: boolean; }[] | `[]` | Specify the data table headers. |
-| rows | Object[] | `[]` | Specify the rows the data table should render. keys defined in `headers` are used for the row ids. |
-| size | "compact" | "short" | "tall" | -- | Set the size of the data table. |
-| title | string | `""` | Specify the title of the data table. |
-| description | string | `""` | Specify the description of the data table. |
-| zebra | boolean | `false` | Set to `true` to use zebra styles. |
-| sortable | boolean | `false` | Set to `true` for the sortable variant. |
-| expandable | boolean | `false` | Set to `true` for the expandable variant. Automatically set to `true` if `batchExpansion` is `true`. |
-| batchExpansion | boolean | `false` | Set to `true` to enable batch expansion. |
-| expandedRowIds | string[] | `[]` | Specify the row ids to be expanded. |
-| radio | boolean | `false` | Set to `true` for the radio selection variant. |
-| selectable | boolean | `false` | Set to `true` for the selectable variant. Automatically set to `true` if `radio` or `batchSelection` are `true`. |
-| batchSelection | boolean | `false` | Set to `true` to enable batch selection. |
-| selectedRowIds | string[] | `[]` | Specify the row ids to be selected. |
-| stickyHeader | boolean | `false` | Set to `true` to enable a sticky header. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | ---------------------------------- | --------------- | ---------------------- |
+| selectedIds | No | let | Yes | ReadonlyArray | [] | -- |
+| labelText | No | let | No | string | "" | Specify the label text |
### Slots
-- **default**: `
...
`
-- **"cell-header"**: `
...
`
-- **"cell"**: `
...
`
-- **"expanded-row"**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-No forwarded events.
+None.
-### Dispatched events
-
-- `on:click:header--expand`
-- `on:click`
-- `on:click:header`
-- `on:click:row`
-- `on:mouseenter:row`
-- `on:mouseleave:row`
-- `on:click:row--expand`
-- `on:click:cell`
-
----
-
-## DataTableSkeleton
-
-### Import path
-
-```js
-import { DataTableSkeleton } from "carbon-components-svelte";
-```
+## `ContextMenuOption`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :-------------------------------------------------- | :------------ | :--------------------------------------------------------------------------- |
-| columns | number | `5` | Specify the number of columns. |
-| rows | number | `5` | Specify the number of rows. |
-| size | "compact" | "short" | "tall" | -- | Set the size of the data table. |
-| zebra | boolean | `false` | Set to `true` to apply zebra styles to the datatable rows. |
-| showHeader | boolean | `true` | Set to `false` to hide the header. |
-| headers | string[] | `[]` | Set the column headers. If `headers` has one more items, `count` is ignored. |
-| showToolbar | boolean | `true` | Set to `false` to hide the toolbar. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------- | :------- | :--------------- | :------- | -------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLLIElement | null | Obtain a reference to the list item HTML element |
+| selectable | No | let | Yes | boolean | false | Set to `true` to enable the selectable variant Automatically set to `true` if `selected` is `true` |
+| selected | No | let | Yes | boolean | false | Set to `true` to use the selected variant |
+| icon | No | let | Yes | any | undefined | Specify the icon to render Icon is rendered to the left of the label text |
+| indented | No | let | Yes | boolean | false | Set to `true` to indent the label |
+| kind | No | let | No | "default" | "danger" | "default" | Specify the kind of option |
+| disabled | No | let | No | boolean | false | Set to `true` to enable the disabled state |
+| labelText | No | let | No | string | "" | Specify the label text. Alternatively, use the "labelText" slot (e.g., `<span slot="labelText">...</span>`) |
+| shortcutText | No | let | No | string | "" | Specify the shortcut text. Alternatively, use the "shortcutText" slot (e.g., `<span slot="shortcutText">...</span>`) |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Specify the id It's recommended to provide an id as a value to bind to within a selectable/radio menu group |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :----------- | :------ | :---- | :-------------------------------------------------- |
+| -- | Yes | -- | -- |
+| icon | No | -- | <svelte:component this={icon} /> |
+| labelText | No | -- | {labelText} |
+| shortcutText | No | -- | {shortcutText} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| keydown | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| click | dispatched | null |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## DatePicker
-
-### Import path
-
-```js
-import { DatePicker } from "carbon-components-svelte";
-```
+## `ContextMenuRadioGroup`
### Props
-| Prop name | Type | Default value | Description |
-| :------------- | :--------------------------------------------------- | :------------ | :--------------------------------------------- |
-| datePickerType | "simple" | "single" | "range" | `"simple"` | Specify the date picker type. |
-| value | string | `""` | Specify the date picker input value. |
-| appendTo | HTMLElement | -- | Specify the element to append the calendar to. |
-| dateFormat | string | `"m/d/Y"` | Specify the date format. |
-| maxDate | null | string | Date | `null` | Specify the maximum date. |
-| minDate | null | string | Date | `null` | Specify the minimum date. |
-| locale | string | `"en"` | Specify the locale. |
-| short | boolean | `false` | Set to `true` to use the short variant. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| id | string | -- | Set an id for the date picker element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | ------------------- | --------------- | ------------------------------- |
+| selectedId | No | let | Yes | string | "" | Set the selected radio group id |
+| labelText | No | let | No | string | "" | Specify the label text |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+None.
-### Dispatched events
-
-- `on:change`
-
----
-
-## DatePickerInput
-
-### Import path
-
-```js
-import { DatePickerInput } from "carbon-components-svelte";
-```
+## `CopyButton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :---------------------------------------- | :------------------------------- | :-------------------------------------------------- |
-| size | "sm" | "xl" | -- | Set the size of the input. |
-| type | string | `"text"` | Specify the input type. |
-| placeholder | string | `""` | Specify the input placeholder text. |
-| pattern | string | `"\\d{1,2}\\/\\d{1,2}\\/\\d{4}"` | Specify the Regular Expression for the input value. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| iconDescription | string | `""` | Specify the ARIA label for the calendar icon. |
-| id | string | -- | Set an id for the input element. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| name | string | -- | Set a name for the input element. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
+| feedback | No | let | No | string | "Copied!" | Set the feedback text shown after clicking the button |
+| feedbackTimeout | No | let | No | number | 2000 | Set the timeout duration (ms) to display feedback text |
+| iconDescription | No | let | No | string | "Copy to clipboard" | Set the title and ARIA label for the copy button |
+| text | Yes | let | No | string | undefined | Specify the text to copy |
+| copy | No | let | No | (text: string) => void | async (text) => { try { await navigator.clipboard.writeText(text); } catch (e) { console.log(e); } } | Override the default copy behavior of using the navigator.clipboard.writeText API to copy text |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:input`
-- `on:keydown`
-- `on:blur`
+| Event name | Type | Detail |
+| :----------- | :--------- | :---------------- |
+| click | forwarded | -- |
+| animationend | forwarded | -- |
+| copy | dispatched | null |
-### Dispatched events
+## `DataTable`
-No dispatched events.
-
----
-
-## DatePickerSkeleton
-
-### Import path
-
-```js
-import { DatePickerSkeleton } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------- |
-| range | boolean | `false` | Set to `true` to use the range variant. |
-| id | string | -- | Set an id to be used by the label element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Dropdown
-
-### Import path
-
-```js
-import { Dropdown } from "carbon-components-svelte";
-```
-
-### Props
+### Types
```ts
-// `Dropdown` type definitions
+export type DataTableKey =
+ import("./DataTableTypes.d.ts").PropertyPath;
-type DropdownItemId = string;
+export type DataTableValue = any;
-type DropdownItemText = string;
+export interface DataTableEmptyHeader {
+ key: DataTableKey | (string & {});
+ empty: boolean;
+ display?: (item: DataTableValue, row: Row) => DataTableValue;
+ sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
+ columnMenu?: boolean;
+ width?: string;
+ minWidth?: string;
+}
-interface DropdownItem {
+export interface DataTableNonEmptyHeader {
+ key: DataTableKey;
+ value: DataTableValue;
+ display?: (item: DataTableValue, row: Row) => DataTableValue;
+ sort?: false | ((a: DataTableValue, b: DataTableValue) => number);
+ columnMenu?: boolean;
+ width?: string;
+ minWidth?: string;
+}
+
+export type DataTableHeader =
+ | DataTableNonEmptyHeader
+ | DataTableEmptyHeader;
+
+export interface DataTableRow {
+ id: any;
+ [key: string]: DataTableValue;
+}
+
+export type DataTableRowId = any;
+
+export interface DataTableCell {
+ key: DataTableKey | (string & {});
+ value: DataTableValue;
+ display?: (item: DataTableValue, row: DataTableRow) => DataTableValue;
+}
+```
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | ------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| selectedRowIds | No | let | Yes | ReadonlyArray | [] | Specify the row ids to be selected |
+| selectable | No | let | Yes | boolean | false | Set to `true` for the selectable variant Automatically set to `true` if `radio` or `batchSelection` are `true` |
+| expandedRowIds | No | let | Yes | ReadonlyArray | [] | Specify the row ids to be expanded |
+| expandable | No | let | Yes | boolean | false | Set to `true` for the expandable variant Automatically set to `true` if `batchExpansion` is `true` |
+| sortDirection | No | let | Yes | "none" | "ascending" | "descending" | "none" | Specify the sort direction |
+| sortKey | No | let | Yes | DataTableKey | null | Specify the header key to sort by |
+| headers | No | let | No | ReadonlyArray> | [] | Specify the data table headers |
+| rows | No | let | No | ReadonlyArray | [] | Specify the rows the data table should render keys defined in `headers` are used for the row ids |
+| size | No | let | No | "compact" | "short" | "medium" | "tall" | undefined | Set the size of the data table |
+| title | No | let | No | string | "" | Specify the title of the data table |
+| description | No | let | No | string | "" | Specify the description of the data table |
+| inputName | No | let | No | string | "ccs-" + Math.random().toString(36) | Specify a name attribute for the input elements in a selectable data table (radio or checkbox). When the table is inside a form, this name will be included in the form data on submit. |
+| zebra | No | let | No | boolean | false | Set to `true` to use zebra styles |
+| sortable | No | let | No | boolean | false | Set to `true` for the sortable variant |
+| batchExpansion | No | let | No | boolean | false | Set to `true` to enable batch expansion |
+| nonExpandableRowIds | No | let | No | ReadonlyArray | [] | Specify the ids for rows that should not be expandable |
+| radio | No | let | No | boolean | false | Set to `true` for the radio selection variant |
+| batchSelection | No | let | No | boolean | false | Set to `true` to enable batch selection |
+| nonSelectableRowIds | No | let | No | ReadonlyArray | [] | Specify the ids of rows that should not be selectable |
+| stickyHeader | No | let | No | boolean | false | Set to `true` to enable a sticky header |
+| useStaticWidth | No | let | No | boolean | false | Set to `true` to use static width |
+| pageSize | No | let | No | number | 0 | Specify the number of items to display in a page |
+| page | No | let | No | number | 0 | Set to `number` to set current page |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :----------- | :------ | :----------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- |
+| -- | Yes | -- | -- |
+| cell | No | { row: Row; cell: DataTableCell; rowIndex: number; cellIndex: number; } | {cell.display ? cell.display(cell.value, row) : cell.value} |
+| cell-header | No | { header: DataTableNonEmptyHeader; } | {header.value} |
+| description | No | -- | {description} |
+| expanded-row | No | { row: Row; } | -- |
+| title | No | -- | {title} |
+
+### Events
+
+| Event name | Type | Detail |
+| :------------------- | :--------- | :----------------------------------------------------------------------------------------------------------- |
+| click | dispatched | { header?: DataTableHeader; row?: Row; cell?: DataTableCell; } |
+| click:header--expand | dispatched | { expanded: boolean; } |
+| click:header | dispatched | { header: DataTableHeader; sortDirection?: "ascending" | "descending" | "none" } |
+| click:header--select | dispatched | { indeterminate: boolean; selected: boolean; } |
+| click:row | dispatched | Row |
+| mouseenter:row | dispatched | Row |
+| mouseleave:row | dispatched | Row |
+| click:row--expand | dispatched | { expanded: boolean; row: Row; } |
+| click:row--select | dispatched | { selected: boolean; row: Row; } |
+| click:cell | dispatched | DataTableCell |
+
+## `DataTableSkeleton`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | ------------------------------------------------------------------ | ---------------------- | -------------------------------------------------------------------------------------------- |
+| columns | No | let | No | number | 5 | Specify the number of columns Superseded by `headers` if `headers` is a non-empty array |
+| rows | No | let | No | number | 5 | Specify the number of rows |
+| size | No | let | No | "compact" | "short" | "tall" | undefined | Set the size of the data table |
+| zebra | No | let | No | boolean | false | Set to `true` to apply zebra styles to the datatable rows |
+| showHeader | No | let | No | boolean | true | Set to `false` to hide the header |
+| headers | No | let | No | ReadonlyArray> | [] | Set the column headers Supersedes `columns` if value is a non-empty array |
+| showToolbar | No | let | No | boolean | true | Set to `false` to hide the toolbar |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `DatePicker`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
+| valueTo | No | let | Yes | string | "" | Specify the date picker end date value (to) Only works with the "range" date picker type |
+| valueFrom | No | let | Yes | string | "" | Specify the date picker start date value (from) Only works with the "range" date picker type |
+| value | No | let | Yes | number | string | "" | Specify the date picker input value |
+| datePickerType | No | let | No | "simple" | "single" | "range" | "simple" | Specify the date picker type |
+| dateFormat | No | let | No | string | "m/d/Y" | Specify the date format |
+| maxDate | No | let | No | null | string | Date | null | Specify the maximum date |
+| minDate | No | let | No | null | string | Date | null | Specify the minimum date |
+| locale | No | let | No | import("flatpickr/dist/types/locale").CustomLocale | import("flatpickr/dist/types/locale").key | "en" | Specify the locale |
+| short | No | let | No | boolean | false | Set to `true` to use the short variant |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the date picker element |
+| flatpickrProps | No | let | No | import("flatpickr/dist/types/options").Options | { static: true } | Override the options passed to the Flatpickr instance. @see https://flatpickr.js.org/options |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------------------------------------------------------------------------------------------------------------------------- |
+| change | dispatched | string | { selectedDates: [dateFrom: Date, dateTo?: Date]; dateStr: string | { from: string; to: string; } } |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `DatePickerInput`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | -------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the input |
+| type | No | let | No | string | "text" | Specify the input type |
+| placeholder | No | let | No | string | "" | Specify the input placeholder text |
+| pattern | No | let | No | string | "\\d{1,2}\\/\\d{1,2}\\/\\d{4}" | Specify the Regular Expression for the input value |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| iconDescription | No | let | No | string | "" | Specify the ARIA label for the calendar icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| name | No | let | No | string | undefined | Set a name for the input element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| input | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
+
+## `DatePickerSkeleton`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------------------------------------ | ----------------------------------------- |
+| range | No | let | No | boolean | false | Set to `true` to use the range variant |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id to be used by the label element |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `Dropdown`
+
+### Types
+
+```ts
+export type DropdownItemId = any;
+
+export type DropdownItemText = string;
+
+export interface DropdownItem {
id: DropdownItemId;
text: DropdownItemText;
+ disabled?: boolean;
}
```
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------------------------------ | :------------ | :--------------------------------------------- |
-| items | DropdownItem[] | `[]` | Set the dropdown items. |
-| itemToString | (item: DropdownItem) => string | -- | Override the display of a dropdown item. |
-| selectedIndex | number | -- | Specify the selected item index. |
-| type | "default" | "inline" | `"default"` | Specify the type of dropdown. |
-| size | "sm" | "lg" | "xl" | -- | Specify the size of the dropdown field. |
-| open | boolean | `false` | Set to `true` to open the dropdown. |
-| inline | boolean | `false` | Set to `true` to use the inline variant. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the dropdown. |
-| titleText | string | `""` | Specify the title text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| helperText | string | `""` | Specify the helper text. |
-| label | string | -- | Specify the list box label. |
-| translateWithId | (id: any) => string | -- | Override the default translation ids. |
-| id | string | -- | Set an id for the list box component. |
-| name | string | -- | Specify a name attribute for the list box. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the dropdown |
+| selectedId | Yes | let | Yes | DropdownItemId | undefined | Specify the selected item id |
+| items | No | let | No | ReadonlyArray | [] | Set the dropdown items |
+| itemToString | No | let | No | (item: DropdownItem) => string | (item) => item.text || item.id | Override the display of a dropdown item |
+| type | No | let | No | "default" | "inline" | "default" | Specify the type of dropdown |
+| direction | No | let | No | "bottom" | "top" | "bottom" | Specify the direction of the dropdown menu |
+| size | No | let | No | "sm" | "lg" | "xl" | undefined | Specify the size of the dropdown field |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the dropdown |
+| titleText | No | let | No | string | "" | Specify the title text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| label | No | let | No | string | undefined | Specify the list box label |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| translateWithId | No | let | No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string | undefined | Override the chevron icon label based on the open state. Defaults to "Open menu" when closed and "Close menu" when open |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component |
+| name | No | let | No | string | undefined | Specify a name attribute for the list box |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :--------------------------------------------------- | :-------------------------------- |
+| -- | Yes | { item: DropdownItem; index: number; } | {itemToString(item)} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------------------------------------------------------------- |
+| select | dispatched | { selectedId: DropdownItemId, selectedItem: DropdownItem } |
-### Dispatched events
-
-- `on:select`
-
----
-
-## DropdownSkeleton
-
-### Import path
-
-```js
-import { DropdownSkeleton } from "carbon-components-svelte";
-```
+## `DropdownSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------------- |
-| inline | boolean | `false` | Set to `true` to use the inline variant. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------- |
+| inline | No | let | No | boolean | false | Set to `true` to use the inline variant |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ExpandableTile
-
-### Import path
-
-```js
-import { ExpandableTile } from "carbon-components-svelte";
-```
+## `ExpandableTile`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------------- | :----------------------------------- | :---------------------------- | :----------------------------------------------------- |
-| expanded | boolean | `false` | Set to `true` to expand the tile. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| tileMaxHeight | number | `0` | Specify the max height of the tile (number of pixels). |
-| tilePadding | number | `0` | Specify the padding of the tile (number of pixels). |
-| tileCollapsedIconText | string | `"Interact to expand Tile"` | Specify the icon text of the collapsed tile. |
-| tileExpandedIconText | string | `"Interact to collapse Tile"` | Specify the icon text of the expanded tile. |
-| tabindex | string | `"0"` | Specify the tabindex. |
-| id | string | -- | Set an id for the top-level div element. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the top-level element |
+| tilePadding | No | let | Yes | number | 0 | Specify the padding of the tile (number of pixels) |
+| tileMaxHeight | No | let | Yes | number | 0 | Specify the max height of the tile (number of pixels) |
+| expanded | No | let | Yes | boolean | false | Set to `true` to expand the tile |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| tileCollapsedIconText | No | let | No | string | "Interact to expand Tile" | Specify the icon text of the collapsed tile |
+| tileExpandedIconText | No | let | No | string | "Interact to collapse Tile" | Specify the icon text of the expanded tile |
+| tileExpandedLabel | No | let | No | string | "" | Specify the icon label of the expanded tile |
+| tileCollapsedLabel | No | let | No | string | "" | Specify the icon label of the collapsed tile |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level div element |
### Slots
-- **"above"**: `
...
`
-- **"below"**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| above | No | -- | -- |
+| below | No | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:keypress`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keypress | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## FileUploader
-
-### Import path
-
-```js
-import { FileUploader } from "carbon-components-svelte";
-```
+## `FileUploader`
### Props
-| Prop name | Type | Default value | Description |
-| :---------------------- | :----------------------------------------------------------------------------------------- | :--------------------------- | :--------------------------------------------------------------------- |
-| status | "uploading" | "edit" | "complete" | `"uploading"` | Specify the file uploader status. |
-| accept | string[] | `[]` | Specify the accepted file types. |
-| files | string[] | `[]` | Obtain the uploaded file names. |
-| multiple | boolean | `false` | Set to `true` to allow multiple files. |
-| clearFiles (`constant`) | () => any | -- | Override the default behavior of clearing the array of uploaded files. |
-| labelDescription | string | `""` | Specify the label description. |
-| labelTitle | string | `""` | Specify the label title. |
-| kind | "primary" | "secondary" | "tertiary" | "ghost" | "danger" | `"primary"` | Specify the kind of file uploader button. |
-| buttonLabel | string | `""` | Specify the button label. |
-| iconDescription | string | `"Provide icon description"` | Specify the ARIA label used for the status icons. |
-| name | string | `""` | Specify a name attribute for the file button uploader input. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :----------------- | :------- | ------------------------------------------------------------------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| files | No | let | Yes | ReadonlyArray | [] | Obtain a reference to the uploaded files |
+| status | No | let | No | "uploading" | "edit" | "complete" | "uploading" | Specify the file uploader status |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the file uploader |
+| accept | No | let | No | ReadonlyArray | [] | Specify the accepted file types |
+| multiple | No | let | No | boolean | false | Set to `true` to allow multiple files |
+| clearFiles | No | const | No | () => void | () => { files = []; } | Programmatically clear the uploaded files |
+| labelTitle | No | let | No | string | "" | Specify the label title. Alternatively, use the named slot "labelTitle" (e.g., `<span slot="labelTitle">...</span>`) |
+| labelDescription | No | let | No | string | "" | Specify the label description. Alternatively, use the named slot "labelDescription" (e.g., `<span slot="labelDescription">...</span>`) |
+| kind | No | let | No | import("../Button/Button.svelte").ButtonProps["kind"] | "primary" | Specify the kind of file uploader button |
+| size | No | let | No | import("../Button/Button.svelte").ButtonProps["size"] | "small" | Specify the size of the file uploader button |
+| buttonLabel | No | let | No | string | "" | Specify the button label |
+| iconDescription | No | let | No | string | "Provide icon description" | Specify the ARIA label used for the status icons |
+| name | No | let | No | string | "" | Specify a name attribute for the file button uploader input |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :--------------- | :------ | :---- | :------------------------------ |
+| labelDescription | No | -- | {labelDescription} |
+| labelTitle | No | -- | {labelTitle} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:keydown`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------- |
+| add | dispatched | ReadonlyArray |
+| remove | dispatched | ReadonlyArray |
+| change | dispatched | ReadonlyArray |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
-### Dispatched events
-
-- `on:add`
-- `on:remove`
-
----
-
-## FileUploaderButton
-
-### Import path
-
-```js
-import { FileUploaderButton } from "carbon-components-svelte";
-```
+## `FileUploaderButton`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------ | :----------------------------------------------------------------------------------------- | :------------ | :-------------------------------------------- |
-| accept | string[] | `[]` | Specify the accepted file types. |
-| multiple | boolean | `false` | Set to `true` to allow multiple files. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| disableLabelChanges | boolean | `false` | Set to `true` to disable label changes. |
-| kind | "primary" | "secondary" | "tertiary" | "ghost" | "danger" | `"primary"` | Specify the kind of file uploader button. |
-| labelText | string | `"Add file"` | Specify the label text. |
-| role | string | `"button"` | Specify the label role. |
-| tabindex | string | `"0"` | Specify `tabindex` attribute. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | ------------------------------------------------------------------ | ------------------------------------------------ | -------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| labelText | No | let | Yes | string | "Add file" | Specify the label text |
+| files | No | let | Yes | ReadonlyArray | [] | Obtain a reference to the uploaded files |
+| accept | No | let | No | ReadonlyArray | [] | Specify the accepted file types |
+| multiple | No | let | No | boolean | false | Set to `true` to allow multiple files |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| disableLabelChanges | No | let | No | boolean | false | Set to `true` to disable label changes |
+| kind | No | let | No | import("../Button/Button.svelte").ButtonProps["kind"] | "primary" | Specify the kind of file uploader button |
+| size | No | let | No | import("../Button/Button.svelte").ButtonProps["size"] | "small" | Specify the size of the file uploader button |
+| role | No | let | No | string | "button" | Specify the label role |
+| tabindex | No | let | No | string | "0" | Specify `tabindex` attribute |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | "" | Specify a name attribute for the input |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Forwarded events
+### Events
-- `on:keydown`
-- `on:change`
-- `on:click`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------- |
+| change | dispatched | ReadonlyArray |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## FileUploaderDropContainer
-
-### Import path
-
-```js
-import { FileUploaderDropContainer } from "carbon-components-svelte";
-```
+## `FileUploaderDropContainer`
### Props
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | ---------------------------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| files | No | let | Yes | ReadonlyArray | [] | Obtain a reference to the uploaded files |
+| accept | No | let | No | ReadonlyArray | [] | Specify the accepted file types |
+| multiple | No | let | No | boolean | false | Set to `true` to allow multiple files |
+| validateFiles | No | let | No | (files: ReadonlyArray) => ReadonlyArray | (files) => files | Override the default behavior of validating uploaded files. By default, files are not validated |
+| labelText | No | let | No | string | "Add file" | Specify the label text |
+| role | No | let | No | string | "button" | Specify the `role` attribute of the drop container |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| tabindex | No | let | No | string | "0" | Specify `tabindex` attribute |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | "" | Specify a name attribute for the input |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------- |
+| add | dispatched | ReadonlyArray |
+| change | dispatched | ReadonlyArray |
+| dragover | forwarded | -- |
+| dragleave | forwarded | -- |
+| drop | forwarded | -- |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
+
+## `FileUploaderItem`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------ |
+| status | No | let | No | "uploading" | "edit" | "complete" | "uploading" | Specify the file uploader status |
+| size | No | let | No | "default" | "field" | "small" | "default" | Specify the size of button skeleton |
+| iconDescription | No | let | No | string | "" | Specify the ARIA label used for the status icons |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| errorSubject | No | let | No | string | "" | Specify the error subject text |
+| errorBody | No | let | No | string | "" | Specify the error body text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
+| name | No | let | No | string | "" | Specify the file uploader name |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| delete | dispatched | string |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `FileUploaderSkeleton`
+
+### Props
+
+None.
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `Filename`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------------ | ------------------------------------------------ |
+| status | No | let | No | "uploading" | "edit" | "complete" | "uploading" | Specify the file name status |
+| iconDescription | No | let | No | string | "" | Specify the ARIA label used for the status icons |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+
+## `FluidForm`
+
+### Props
+
+None.
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| submit | forwarded | -- |
+
+## `Form`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------------- | ----------------- | -------------------------------------- |
+| ref | No | let | Yes | null | HTMLFormElement | null | Obtain a reference to the form element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| submit | forwarded | -- |
+
+## `FormGroup`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------- |
+| noMargin | No | let | No | boolean | false | Set to `true` for to remove the bottom margin |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| message | No | let | No | boolean | false | Set to `true` to render a form requirement |
+| messageText | No | let | No | string | "" | Specify the message text |
+| legendText | No | let | No | string | "" | Specify the legend text |
+| legendId | No | let | No | string | "" | Specify an id for the legend element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `FormItem`
+
+### Props
+
+None.
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `FormLabel`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------- | ------------------------------------------------ | ----------------------------------------- |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id to be used by the label element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `Grid`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| as | No | let | No | boolean | false | Set to `true` to render a custom HTML element Props are destructured as `props` in the default slot (e.g., <Grid let:props><header {...props}>...</header></Grid>) |
+| condensed | No | let | No | boolean | false | Set to `true` to use the condensed variant |
+| narrow | No | let | No | boolean | false | Set to `true` to use the narrow variant |
+| fullWidth | No | let | No | boolean | false | Set to `true` to use the fullWidth variant |
+| noGutter | No | let | No | boolean | false | Set to `true` to remove the gutter |
+| noGutterLeft | No | let | No | boolean | false | Set to `true` to remove the left gutter |
+| noGutterRight | No | let | No | boolean | false | Set to `true` to remove the right gutter |
+| padding | No | let | No | boolean | false | Set to `true` to add top and bottom padding to all columns |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :-------------------------------------------------------------- | :------- |
+| -- | Yes | { props: { class: string; [key: string]: any; } } | -- |
+
+### Events
+
+None.
+
+## `Header`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------------------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| isSideNavOpen | No | let | Yes | boolean | false | Set to `true` to open the side nav |
+| expandedByDefault | No | let | No | boolean | true | Set to `false` to hide the side nav by default |
+| uiShellAriaLabel | No | let | No | string | undefined | Specify the ARIA label for the header |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+| company | No | let | No | string | undefined | Specify the company name.
Alternatively, use the named slot "company" (e.g., `<span slot="company">...</span>`) |
+| platformName | No | let | No | string | "" | Specify the platform name. Alternatively, use the named slot "platform" (e.g., `<span slot="platform">...</span>`) |
+| persistentHamburgerMenu | No | let | No | boolean | false | Set to `true` to persist the hamburger menu |
+| expansionBreakpoint | No | let | No | number | 1056 | The window width (px) at which the SideNav is expanded and the hamburger menu is hidden. 1056 represents the "large" breakpoint in pixels from the Carbon Design System: - small: 320 - medium: 672 - large: 1056 - x-large: 1312 - max: 1584 |
+| iconMenu | No | let | No | any | undefined | Specify the icon to render for the closed state. Defaults to `<Menu size={20} />` |
+| iconClose | No | let | No | any | undefined | Specify the icon to render for the opened state. Defaults to `<Close size={20} />` |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------------- | :------ | :---- | :--------------------------- |
+| -- | Yes | -- | -- |
+| company | No | -- | {company} |
+| platform | No | -- | {platformName} |
+| skip-to-content | No | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+
+## `HeaderAction`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------------- | :------- | :--------------- | :------- | ----------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element |
+| isOpen | No | let | Yes | boolean | false | Set to `true` to open the panel |
+| icon | No | let | No | any | undefined | Specify the icon to render when the action panel is closed. Defaults to `<Switcher size={20} />` |
+| closeIcon | No | let | No | any | undefined | Specify the icon to render when the action panel is open. Defaults to `<Close size={20} />` |
+| text | No | let | No | string | undefined | Specify the text displayed next to the icon. Alternatively, use the named slot "text" (e.g., `<div slot="text">...</div>`) |
+| iconDescription | No | let | No | string | undefined | Specify an icon tooltip. The tooltip will not be displayed if either the `text` prop or a named slot="text" is used |
+| tooltipAlignment | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon. Only applies when `iconDescription` is provided |
+| transition | No | let | No | false | import("svelte/transition").SlideParams | { duration: 200 } | Customize the panel transition (i.e., `transition:slide`). Set to `false` to disable the transition |
+| preventCloseOnClickOutside | No | let | No | boolean | false | Set to `true` to prevent the panel from closing when clicking outside |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------------------------------------------------------------------------------------- |
+| -- | Yes | -- | -- |
+| closeIcon | No | -- | <svelte:component this={closeIcon} size={20} /> |
+| icon | No | -- | <svelte:component this={icon} size={20} /> |
+| text | No | -- | {#if text}<span class:bx--header\_\_action-text={true}>{text}</span>{/if} |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| open | dispatched | null |
+| close | dispatched | null |
+| click | forwarded | -- |
+
+## `HeaderActionLink`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| linkIsActive | No | let | No | boolean | false | Set to `true` to use the active state |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+| icon | No | let | No | any | undefined | Specify the icon to render |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------------------------------------------------ |
+| icon | No | -- | <svelte:component this={icon} size={20} /> |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+
+## `HeaderGlobalAction`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | HTMLButtonElement | null | Obtain a reference to the HTML button element |
+| isActive | No | let | No | boolean | false | Set to `true` to use the active variant |
+| icon | No | let | No | any | undefined | Specify the icon to render |
+
+### Slots
+
+None.
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+
+## `HeaderNav`
+
+### Props
+
+None.
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+None.
+
+## `HeaderNavItem`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+| text | No | let | No | string | undefined | Specify the text |
+| isSelected | No | let | No | boolean | false | Set to `true` to select the item |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------ |
+| -- | Yes | -- | {text} |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keyup | forwarded | -- |
+| keydown | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+
+## `HeaderNavMenu`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| expanded | No | let | Yes | boolean | false | Set to `true` to toggle the expanded state |
+| href | No | let | No | string | "/" | Specify the `href` attribute |
+| text | No | let | No | string | undefined | Specify the text |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+
+## `HeaderPanelDivider`
+
+### Props
+
+None.
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+None.
+
+## `HeaderPanelLink`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+
+## `HeaderPanelLinks`
+
+### Props
+
+None.
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+None.
+
+## `HeaderSearch`
+
+### Types
+
```ts
-// `FileUploaderDropContainer` type definitions
-
-type Files = string[];
-```
-
-| Prop name | Type | Default value | Description |
-| :------------ | :---------------------------------------- | :------------ | :-------------------------------------------------------------------------------------------------------- |
-| accept | string[] | `[]` | Specify the accepted file types. |
-| multiple | boolean | `false` | Set to `true` to allow multiple files. |
-| validateFiles | (files: Files) => Files | -- | Override the default behavior of validating uploaded files. The default behavior does not validate files. |
-| labelText | string | `"Add file"` | Specify the label text. |
-| role | string | `"button"` | Specify the `role` attribute of the drop container. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| tabindex | string | `"0"` | Specify `tabindex` attribute. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:dragover`
-- `on:dragleave`
-- `on:drop`
-- `on:keydown`
-- `on:change`
-- `on:click`
-
-### Dispatched events
-
-- `on:add`
-
----
-
-## FileUploaderItem
-
-### Import path
-
-```js
-import { FileUploaderItem } from "carbon-components-svelte";
+export interface HeaderSearchResult {
+ href: string;
+ text: string;
+ description?: string;
+}
```
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------------------------------------------- | :------------ | :------------------------------------------------ |
-| status | "uploading" | "edit" | "complete" | `"uploading"` | Specify the file uploader status. |
-| iconDescription | string | `""` | Specify the ARIA label used for the status icons. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| errorSubject | string | `""` | Specify the error subject text. |
-| errorBody | string | `""` | Specify the error body text. |
-| id | string | -- | Set an id for the top-level element. |
-| name | string | `""` | Specify the file uploader name. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | ---------------------------------------------- | ------------------ | -------------------------------------------------- |
+| selectedResultIndex | No | let | Yes | number | 0 | Specify the selected result index |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| active | No | let | Yes | boolean | false | Set to `true` to activate and focus the search bar |
+| value | No | let | Yes | string | "" | Specify the search input value |
+| results | No | let | No | ReadonlyArray | [] | Render a list of search results |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| -- | Yes | { result: HeaderSearchResult; index: number } | {result.text} {#if result.description}<span class:bx--header-search-menu-description={true} >– {result.description}</span >{/if} |
-### Forwarded events
+### Events
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------------------------------------------------------------------------------------- |
+| active | dispatched | null |
+| inactive | dispatched | null |
+| clear | dispatched | null |
+| select | dispatched | { value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult } |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| keydown | forwarded | -- |
+| paste | forwarded | -- |
-### Dispatched events
-
-- `on:delete`
-
----
-
-## FileUploaderSkeleton
-
-### Import path
-
-```js
-import { FileUploaderSkeleton } from "carbon-components-svelte";
-```
+## `HeaderUtilities`
### Props
-No exported props.
+None.
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+None.
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Filename
-
-### Import path
-
-```js
-import { Filename } from "carbon-components-svelte";
-```
+## `ImageLoader`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------------------------------------------- | :------------ | :------------------------------------------------ |
-| status | "uploading" | "edit" | "complete" | `"uploading"` | Specify the file name status. |
-| iconDescription | string | `""` | Specify the ARIA label used for the status icons. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :----------------- | :------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
+| error | No | let | Yes | boolean | false | Set to `true` if an error occurs when loading the image |
+| loaded | No | let | Yes | boolean | false | Set to `true` when the image is loaded |
+| loading | No | let | Yes | boolean | false | Set to `true` when `loaded` is `true` and `error` is false |
+| src | No | let | No | string | "" | Specify the image source |
+| alt | No | let | No | string | "" | Specify the image alt text |
+| ratio | No | let | No | "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "3x2" | "9x16" | "1x2" | undefined | Specify the aspect ratio for the image wrapper |
+| fadeIn | No | let | No | boolean | false | Set to `true` to fade in the image on load The duration uses the `fast-02` value following Carbon guidelines on motion |
+| loadImage | No | const | No | (url?: string) => void | (url) => { if (image != null) image = null; loaded = false; error = false; image = new Image(); image.src = url || src; image.onload = () => (loaded = true); image.onerror = () => (error = true); } | Method invoked to load the image provided a `src` value |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| error | No | -- | -- |
+| loading | No | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:keydown`
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| load | dispatched | null |
+| error | dispatched | null |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## FluidForm
-
-### Import path
-
-```js
-import { FluidForm } from "carbon-components-svelte";
-```
+## `InlineLoading`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ------------------------------------------------------------------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| status | No | let | No | "active" | "inactive" | "finished" | "error" | "active" | Set the loading status |
+| description | No | let | No | string | undefined | Set the loading description |
+| iconDescription | No | let | No | string | undefined | Specify a description for the loading icon. Defaults to the `status` prop for the "error" and "finished" states |
+| successDelay | No | let | No | number | 1500 | Specify the timeout delay (ms) after `status` is set to "success" |
### Slots
-- **default**: `
...
`
+None.
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| success | dispatched | null |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Form
-
-### Import path
-
-```js
-import { Form } from "carbon-components-svelte";
-```
+## `InlineNotification`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------------- | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------- |
+| kind | No | let | No | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | "error" | Specify the kind of notification |
+| lowContrast | No | let | No | boolean | false | Set to `true` to use the low contrast variant |
+| timeout | No | let | No | number | 0 | Set the timeout duration (ms) to hide the notification after opening it |
+| role | No | let | No | string | "alert" | Set the `role` attribute |
+| title | No | let | No | string | "" | Specify the title text |
+| subtitle | No | let | No | string | "" | Specify the subtitle text |
+| hideCloseButton | No | let | No | boolean | false | Set to `true` to hide the close button |
+| statusIconDescription | No | let | No | string | kind + " icon" | Specify the ARIA label for the status icon |
+| closeButtonDescription | No | let | No | string | "Close notification" | Specify the ARIA label for the close button |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :---------------------- |
+| -- | Yes | -- | -- |
+| actions | No | -- | -- |
+| subtitle | No | -- | {subtitle} |
+| title | No | -- | {title} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:submit`
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------- |
+| close | dispatched | { timeout: boolean } |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## FormGroup
-
-### Import path
-
-```js
-import { FormGroup } from "carbon-components-svelte";
-```
+## `Link`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------- | :------------ | :------------------------------------------ |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| message | boolean | `false` | Set to `true` to render a form requirement. |
-| messageText | string | `""` | Specify the message text. |
-| legendText | string | `""` | Specify the legend text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | -------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the top-level HTML element |
+| size | No | let | No | "sm" | "lg" | undefined | Specify the size of the link |
+| href | No | let | No | string | undefined | Specify the href value |
+| inline | No | let | No | boolean | false | Set to `true` to use the inline variant |
+| icon | No | let | No | any | undefined | Specify the icon to render `inline` must be `false` |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the checkbox |
+| visited | No | let | No | boolean | false | Set to `true` to allow visited styles |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :-------------------------------------------------- |
+| -- | Yes | -- | -- |
+| icon | No | -- | <svelte:component this={icon} /> |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## FormItem
-
-### Import path
-
-```js
-import { FormItem } from "carbon-components-svelte";
-```
+## `ListBox`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------------------------- | ---------------------- | ------------------------------------------ |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the list box |
+| type | No | let | No | "default" | "inline" | "default" | Set the type of the list box |
+| open | No | let | No | boolean | false | Set to `true` to open the list box |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the list box |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
-### Dispatched events
+## `ListBoxField`
-No dispatched events.
-
----
-
-## FormLabel
-
-### Import path
-
-```js
-import { FormLabel } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :----------------------------------------- |
-| id | string | -- | Set an id to be used by the label element. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Grid
-
-### Import path
-
-```js
-import { Grid } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :------------ | :------------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| as | boolean | `false` | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Grid let:props><header {...props}>...</header></Grid>). |
-| condensed | boolean | `false` | Set to `true` to use the condensed variant. |
-| narrow | boolean | `false` | Set to `true` to use the narrow variant. |
-| fullWidth | boolean | `false` | Set to `true` to use the fullWidth variant. |
-| noGutter | boolean | `false` | Set to `true` to remove the gutter. |
-| noGutterLeft | boolean | `false` | Set to `true` to remove the left gutter. |
-| noGutterRight | boolean | `false` | Set to `true` to remove the right gutter. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Header
-
-### Import path
-
-```js
-import { Header } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :---------------- | :----------------------------------------- | :------------ | :--------------------------------------------------------------------------------------------------------------------------- |
-| expandedByDefault | boolean | `true` | Set to `false` to hide the side nav by default. |
-| isSideNavOpen | boolean | `false` | Set to `true` to open the side nav. |
-| uiShellAriaLabel | string | -- | Specify the ARIA label for the header. |
-| href | string | -- | Specify the `href` attribute. |
-| company | string | -- | Specify the company name. |
-| platformName | string | `""` | Specify the platform name. Alternatively, use the named slot "platform" (e.g. <span slot="platform">...</span>). |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
-
-### Slots
-
-- **default**: `
...
`
-- **"skip-to-content"**: `
...
`
-- **"platform"**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## HeaderAction
-
-### Import path
-
-```js
-import { HeaderAction } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------- | :------------ | :-------------------------------------------------------------------------------------------------------- |
-| isOpen | boolean | `false` | Set to `true` to open the panel. |
-| icon | { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; } | -- | Specify the icon props. |
-| text | string | -- | Specify the text. Alternatively, use the named slot "text" (e.g. <div slot="text">...</div>). |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
-
-### Slots
-
-- **default**: `
...
`
-- **"text"**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-
-### Dispatched events
-
-- `on:close`
-
----
-
-## HeaderActionLink
-
-### Import path
-
-```js
-import { HeaderActionLink } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :----------- | :-------------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------- |
-| linkIsActive | boolean | `false` | Set to `true` to use the active state. |
-| href | string | -- | Specify the `href` attribute. |
-| icon | { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; } | -- | Specify the icon props. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## HeaderActionSearch
-
-### Import path
-
-```js
-import { HeaderActionSearch } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :------------- | :------------------- | :------------ | :--------------------------------- |
-| searchIsActive | boolean | `false` | Set to `true` to focus the search. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-- `on:focusInputSearch`
-- `on:focusOutInputSearch`
-- `on:inputSearch`
-
----
-
-## HeaderGlobalAction
-
-### Import path
-
-```js
-import { HeaderGlobalAction } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------------------------------------------------------ | :------------ | :--------------------------------------------- |
-| isActive | boolean | `false` | Set to `true` to use the active variant. |
-| icon | typeof import("carbon-icons-svelte/lib/Add16").default | -- | Specify the icon to render. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the HTML button element. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## HeaderNav
-
-### Import path
-
-```js
-import { HeaderNav } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :---------------------------------- |
-| ariaLabel | string | -- | Specify the ARIA label for the nav. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## HeaderNavItem
-
-### Import path
-
-```js
-import { HeaderNavItem } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :----------------------------------------- | :------------ | :--------------------------------------------- |
-| href | string | -- | Specify the `href` attribute. |
-| text | string | -- | Specify the text. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keyup`
-- `on:keydown`
-- `on:focus`
-- `on:blur`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## HeaderNavMenu
-
-### Import path
-
-```js
-import { HeaderNavMenu } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------------- | :----------------------------------------- | :------------------ | :--------------------------------------------- |
-| expanded | boolean | `false` | Set to `true` to toggle the expanded state. |
-| href | string | `"/"` | Specify the `href` attribute. |
-| text | string | -- | Specify the text. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
-| iconDescription | string | `"Expand/Collapse"` | Specify the ARIA label for the chevron icon. |
-
-### Slots
-
-- **default**: `
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Icon
-
-### Import path
-
-```js
-import { Icon } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------------------------------------------------------ | :------------ | :------------------------------------------------------------------------------------------------------ |
-| render | typeof import("carbon-icons-svelte/lib/Add16").default | -- | Specify the icon from `carbon-icons-svelte` to render. Icon size must be 16px (e.g. `Add16`, `Task16`). |
-| skeleton | boolean | `false` | Set to `true` to display the skeleton state. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## IconSkeleton
-
-### Import path
-
-```js
-import { IconSkeleton } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :------------------------ |
-| size | number | `16` | Set the size of the icon. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## InlineLoading
-
-### Import path
-
-```js
-import { InlineLoading } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------------- | :----------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------- |
-| status | "active" | "inactive" | "finished" | "error" | `"active"` | Set the loading status. |
-| description | string | -- | Set the loading description. |
-| iconDescription | string | -- | Specify the ARIA label for the loading icon. |
-| successDelay | number | `1500` | Specify the timeout delay (ms) after `status` is set to "success". |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-- `on:success`
-
----
-
-## InlineNotification
-
-### Import path
-
-```js
-import { InlineNotification } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :--------------- | :------------------------------------------------------------------------------------------------------------- | :---------------------- | :----------------------------------------------------------------------- |
-| notificationType | "toast" | "inline" | `"inline"` | Set the type of notification. |
-| kind | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | `"error"` | Specify the kind of notification. |
-| lowContrast | boolean | `false` | Set to `true` to use the low contrast variant. |
-| timeout | number | `0` | Set the timeout duration (ms) to hide the notification after opening it. |
-| role | string | `"alert"` | Set the `role` attribute. |
-| title | string | `"Title"` | Specify the title text. |
-| subtitle | string | `""` | Specify the subtitle text. |
-| hideCloseButton | boolean | `false` | Set to `true` to hide the close button. |
-| iconDescription | string | `"Closes notification"` | Specify the ARIA label for the icon. |
-
-### Slots
-
-- **default**: `
...
`
-- **"actions"**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-- `on:close`
-
----
-
-## Link
-
-### Import path
-
-```js
-import { Link } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :-------- | :--------------------------------------------------------------------- | :------------ | :------------------------------------------------ |
-| size | "sm" | "lg" | -- | Specify the size of the link. |
-| href | string | -- | Specify the href value. |
-| inline | boolean | `false` | Set to `true` to use the inline variant. |
-| disabled | boolean | `false` | Set to `true` to disable the checkbox. |
-| visited | boolean | `false` | Set to `true` to allow visited styles. |
-| ref | null | HTMLAnchorElement | HTMLParagraphElement | `null` | Obtain a reference to the top-level HTML element. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBox
-
-### Import path
-
-```js
-import { ListBox } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------------------------- | :------------ | :------------------------------------------ |
-| size | "sm" | "xl" | -- | Set the size of the list box. |
-| type | "default" | "inline" | `"default"` | Set the type of the list box. |
-| open | boolean | `false` | Set to `true` to open the list box. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the list box. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:keydown`
-- `on:click`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBoxField
-
-### Import path
-
-```js
-import { ListBoxField } from "carbon-components-svelte";
-```
-
-### Props
+### Types
```ts
-// `ListBoxField` type definitions
-
-type ListBoxFieldTranslationId = "close" | "open";
-```
-
-| Prop name | Type | Default value | Description |
-| :-------------------------- | :----------------------------------------------------- | :--------------------------------- | :------------------------------------------------ |
-| disabled | boolean | `false` | Set to `true` to disable the list box field. |
-| role | string | `"combobox"` | Specify the role attribute. |
-| tabindex | string | `"-1"` | Specify the tabindex. |
-| translationIds (`constant`) | { close: "close"; open: "open"; } | `{ close: "close", open: "open" }` | Default translation ids. |
-| translateWithId | (id: ListBoxFieldTranslationId) => string | -- | Override the default translation ids. |
-| id | string | -- | Set an id for the top-level element. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the top-level HTML element. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
-- `on:blur`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBoxMenu
-
-### Import path
-
-```js
-import { ListBoxMenu } from "carbon-components-svelte";
+export type ListBoxFieldTranslationId = "close" | "open";
```
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :-------------------------------------- | :------------ | :-------------------------------------------- |
-| id | string | -- | Set an id for the top-level element. |
-| ref | null | HTMLDivElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :----------------- | :------- | ------------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the list box field |
+| role | No | let | No | string | "combobox" | Specify the role attribute |
+| tabindex | No | let | No | string | "-1" | Specify the tabindex |
+| translationIds | No | const | No | { close: "close", open: "open" } | { close: "close", open: "open" } | Default translation ids |
+| translateWithId | No | let | No | (id: ListBoxFieldTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:scroll`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBoxMenuIcon
-
-### Import path
-
-```js
-import { ListBoxMenuIcon } from "carbon-components-svelte";
-```
+## `ListBoxMenu`
### Props
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------------- | ------------------------------------------------ | -------------------------------------- |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the HTML element |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| scroll | forwarded | -- |
+
+## `ListBoxMenuIcon`
+
+### Types
+
```ts
-// `ListBoxMenuIcon` type definitions
-
-type ListBoxMenuIconTranslationId = "close" | "open";
-```
-
-| Prop name | Type | Default value | Description |
-| :-------------------------- | :-------------------------------------------------------- | :--------------------------------- | :-------------------------------------------- |
-| open | boolean | `false` | Set to `true` to open the list box menu icon. |
-| translationIds (`constant`) | { close: "close"; open: "open" } | `{ close: "close", open: "open" }` | Default translation ids. |
-| translateWithId | (id: ListBoxMenuIconTranslationId) => string | -- | Override the default translation ids. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-- `on:click`
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBoxMenuItem
-
-### Import path
-
-```js
-import { ListBoxMenuItem } from "carbon-components-svelte";
+export type ListBoxMenuIconTranslationId = "close" | "open";
```
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------- | :------------ | :--------------------------------------------- |
-| active | boolean | `false` | Set to `true` to enable the active state. |
-| highlighted | boolean | `false` | Set to `true` to enable the highlighted state. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :----------------- | :------- | --------------------------------------------------------- | --------------------------------------------- | -------------------------------------------- |
+| open | No | let | No | boolean | false | Set to `true` to open the list box menu icon |
+| translationIds | No | const | No | { close: "close", open: "open" } | { close: "close", open: "open" } | Default translation ids |
+| translateWithId | No | let | No | (id: ListBoxMenuIconTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids |
### Slots
-- **default**: `
...
`
+None.
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ListBoxSelection
-
-### Import path
-
-```js
-import { ListBoxSelection } from "carbon-components-svelte";
-```
+## `ListBoxMenuItem`
### Props
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------- |
+| active | No | let | No | boolean | false | Set to `true` to enable the active state |
+| highlighted | No | let | No | boolean | false | Set to `true` to enable the highlighted state |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the menu item |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+
+## `ListBoxSelection`
+
+### Types
+
```ts
-// `ListBoxSelection` type definitions
-
-type ListBoxSelectionTranslationId = "clearAll" | "clearSelection";
-```
-
-| Prop name | Type | Default value | Description |
-| :-------------------------- | :---------------------------------------------------------------------- | :------------------------------------------------------------ | :------------------------------------------------ |
-| selectionCount | any | -- | Specify the number of selected items. |
-| disabled | boolean | `false` | Set to `true` to disable the list box selection. |
-| translationIds (`constant`) | { clearAll: "clearAll"; clearSelection: "clearSelection" } | `{ clearAll: "clearAll", clearSelection: "clearSelection", }` | Default translation ids. |
-| translateWithId | (id: ListBoxSelectionTranslationId) => string | -- | Override the default translation ids. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the top-level HTML element. |
-
-### Slots
-
-No slots.
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-- `on:clear`
-
----
-
-## ListItem
-
-### Import path
-
-```js
-import { ListItem } from "carbon-components-svelte";
+export type ListBoxSelectionTranslationId = "clearAll" | "clearSelection";
```
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :----------------- | :------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------ |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element |
+| selectionCount | No | let | No | number | undefined | Specify the number of selected items |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the list box selection |
+| translationIds | No | const | No | { clearAll: "clearAll", clearSelection: "clearSelection", } | { clearAll: "clearAll", clearSelection: "clearSelection", } | Default translation ids |
+| translateWithId | No | let | No | (id: ListBoxSelectionTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids |
### Slots
-- **default**: `
...
`
+None.
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------------------- |
+| clear | dispatched | KeyboardEvent | MouseEvent |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Loading
-
-### Import path
-
-```js
-import { Loading } from "carbon-components-svelte";
-```
+## `ListItem`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------- | :--------------------------- | :------------------------------------------ |
-| small | boolean | `false` | Set to `true` to use the small variant. |
-| active | boolean | `true` | Set to `false` to disable the active state. |
-| withOverlay | boolean | `true` | Set to `false` to disable the overlay. |
-| description | string | `"Active loading indicator"` | Specify the label description. |
-| id | string | -- | Set an id for the label element. |
+None.
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Modal
-
-### Import path
-
-```js
-import { Modal } from "carbon-components-svelte";
-```
+## `Loading`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------------- | :---------------------------------------- | :----------------------------- | :-------------------------------------------------------------------------- |
-| size | "xs" | "sm" | "lg" | -- | Set the size of the modal. |
-| open | boolean | `false` | Set to `true` to open the modal. |
-| danger | boolean | `false` | Set to `true` to use the danger variant. |
-| alert | boolean | `false` | Set to `true` to enable alert mode. |
-| passiveModal | boolean | `false` | Set to `true` to use the passive variant. |
-| modalHeading | string | -- | Specify the modal heading. |
-| modalLabel | string | -- | Specify the modal label. |
-| modalAriaLabel | string | -- | Specify the ARIA label for the modal. |
-| iconDescription | string | `"Close the modal"` | Specify the ARIA label for the close icon. |
-| hasForm | boolean | `false` | Set to `true` if the modal contains form elements. |
-| hasScrollingContent | boolean | `false` | Set to `true` if the modal contains scrolling content. |
-| primaryButtonText | string | `""` | Specify the primary button text. |
-| primaryButtonDisabled | boolean | `false` | Set to `true` to disable the primary button. |
-| shouldSubmitOnEnter | boolean | `true` | Set to `true` for the primary button to be triggered when pressing "Enter". |
-| secondaryButtonText | string | `""` | Specify the secondary button text. |
-| selectorPrimaryFocus | string | `"[data-modal-primary-focus]"` | Specify a selector to be focused when opening the modal. |
-| preventCloseOnClickOutside | boolean | `false` | Set to `true` to prevent the modal from closing when clicking outside. |
-| id | string | -- | Set an id for the top-level element. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the top-level HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------- | ---------------------- | ----------------------------------------------------- |
+| small | No | let | No | boolean | false | Set to `true` to use the small variant |
+| active | No | let | No | boolean | true | Set to `false` to disable the active state |
+| withOverlay | No | let | No | boolean | true | Set to `false` to disable the overlay |
+| description | No | let | No | string | "loading" | Specify the description to describe the loading state |
### Slots
-- **default**: `
...
`
-- **"label"**: `
...
`
-- **"heading"**: `
...
`
+None.
-### Forwarded events
+### Events
-- `on:keydown`
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+None.
-### Dispatched events
-
-- `on:submit`
-- `on:click:button--secondary`
-- `on:close`
-- `on:open`
-
----
-
-## ModalBody
-
-### Import path
-
-```js
-import { ModalBody } from "carbon-components-svelte";
-```
+## `LocalStorage`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------ | :------------------- | :------------ | :----------------------------------------------------- |
-| hasForm | boolean | `false` | Set to `true` if the modal contains form elements. |
-| hasScrollingContent | boolean | `false` | Set to `true` if the modal contains scrolling content. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :-------------------- | :------- | ----------------------- | ---------------------------------------------------- | --------------------------------------------------------------- |
+| value | No | let | Yes | any | "" | Provide a value to persist |
+| key | No | let | No | string | "local-storage-key" | Specify the local storage key |
+| clearItem | No | function | No | () => void | () => { localStorage.removeItem(key); } | Remove the persisted key value from the browser's local storage |
+| clearAll | No | function | No | () => void | () => { localStorage.clear(); } | Clear all key values from the browser's local storage |
### Slots
-- **default**: `
...
`
+None.
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------------------- |
+| save | dispatched | null |
+| update | dispatched | { prevValue: any; value: any; } |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ModalFooter
-
-### Import path
-
-```js
-import { ModalFooter } from "carbon-components-svelte";
-```
+## `Modal`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------------- | :------------------- | :------------ | :------------------------------------------- |
-| primaryButtonText | string | `""` | Specify the primary button text. |
-| primaryButtonDisabled | boolean | `false` | Set to `true` to disable the primary button. |
-| primaryClass | string | -- | Specify a class for the primary button. |
-| secondaryButtonText | string | `""` | Specify the secondary button text. |
-| secondaryClass | string | -- | Specify a class for the secondary button. |
-| danger | boolean | `false` | Set to `true` to use the danger variant. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------------- | :------- | :--------------- | :------- | --------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the modal |
+| size | No | let | No | "xs" | "sm" | "lg" | undefined | Set the size of the modal |
+| danger | No | let | No | boolean | false | Set to `true` to use the danger variant |
+| alert | No | let | No | boolean | false | Set to `true` to enable alert mode |
+| passiveModal | No | let | No | boolean | false | Set to `true` to use the passive variant |
+| modalHeading | No | let | No | string | undefined | Specify the modal heading |
+| modalLabel | No | let | No | string | undefined | Specify the modal label |
+| modalAriaLabel | No | let | No | string | undefined | Specify the ARIA label for the modal |
+| iconDescription | No | let | No | string | "Close the modal" | Specify the ARIA label for the close icon |
+| hasForm | No | let | No | boolean | false | Set to `true` if the modal contains form elements |
+| hasScrollingContent | No | let | No | boolean | false | Set to `true` if the modal contains scrolling content |
+| primaryButtonText | No | let | No | string | "" | Specify the primary button text |
+| primaryButtonDisabled | No | let | No | boolean | false | Set to `true` to disable the primary button |
+| primaryButtonIcon | No | let | No | any | undefined | Specify the primary button icon |
+| shouldSubmitOnEnter | No | let | No | boolean | true | Set to `true` for the "submit" and "click:button--primary" events to be dispatched when pressing "Enter" |
+| secondaryButtonText | No | let | No | string | "" | Specify the secondary button text |
+| secondaryButtons | No | let | No | [{ text: string; }, { text: string; }] | [] | 2-tuple prop to render two secondary buttons for a 3 button modal supersedes `secondaryButtonText` |
+| selectorPrimaryFocus | No | let | No | string | "[data-modal-primary-focus]" | Specify a selector to be focused when opening the modal |
+| preventCloseOnClickOutside | No | let | No | boolean | false | Set to `true` to prevent the modal from closing when clicking outside |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :-------------------------- |
+| -- | Yes | -- | -- |
+| heading | No | -- | {modalHeading} |
+| label | No | -- | {modalLabel} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :---------------------- | :--------- | :------------------------------ |
+| transitionend | dispatched | { open: boolean; } |
+| click:button--secondary | dispatched | { text: string; } |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| submit | dispatched | null |
+| click:button--primary | dispatched | null |
+| close | dispatched | null |
+| open | dispatched | null |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ModalHeader
-
-### Import path
-
-```js
-import { ModalHeader } from "carbon-components-svelte";
-```
+## `ModalBody`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------ | :------------ | :----------------------------------------- |
-| title | string | `""` | Specify the modal title. |
-| label | string | `""` | Specify the modal label. |
-| labelClass | string | `""` | Specify the label class. |
-| titleClass | string | `""` | Specify the title class. |
-| closeClass | string | `""` | Specify the close class. |
-| closeIconClass | string | `""` | Specify the close icon class. |
-| iconDescription | string | `"Close"` | Specify the ARIA label for the close icon. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------------------- |
+| hasForm | No | let | No | boolean | false | Set to `true` if the modal contains form elements |
+| hasScrollingContent | No | let | No | boolean | false | Set to `true` if the modal contains scrolling content |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
+None.
-### Dispatched events
-
-No dispatched events.
-
----
-
-## MultiSelect
-
-### Import path
-
-```js
-import { MultiSelect } from "carbon-components-svelte";
-```
+## `ModalFooter`
### Props
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------------- | :------- | :--------------- | :------- | --------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------- |
+| primaryButtonText | No | let | No | string | "" | Specify the primary button text |
+| primaryButtonIcon | No | let | No | any | undefined | Specify the primary button icon |
+| primaryButtonDisabled | No | let | No | boolean | false | Set to `true` to disable the primary button |
+| primaryClass | No | let | No | string | undefined | Specify a class for the primary button |
+| secondaryButtonText | No | let | No | string | "" | Specify the secondary button text |
+| secondaryButtons | No | let | No | [{ text: string; }, { text: string; }] | [] | 2-tuple prop to render two secondary buttons for a 3 button modal supersedes `secondaryButtonText` |
+| secondaryClass | No | let | No | string | undefined | Specify a class for the secondary button |
+| danger | No | let | No | boolean | false | Set to `true` to use the danger variant |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :---------------------- | :--------- | :----------------------------- |
+| click:button--secondary | dispatched | { text: string; } |
+
+## `ModalHeader`
+
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ------------------- | -------------------- | ----------------------------------------- |
+| title | No | let | No | string | "" | Specify the modal title |
+| label | No | let | No | string | "" | Specify the modal label |
+| labelClass | No | let | No | string | "" | Specify the label class |
+| titleClass | No | let | No | string | "" | Specify the title class |
+| closeClass | No | let | No | string | "" | Specify the close class |
+| closeIconClass | No | let | No | string | "" | Specify the close icon class |
+| iconDescription | No | let | No | string | "Close" | Specify the ARIA label for the close icon |
+
+### Slots
+
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+
+## `MultiSelect`
+
+### Types
+
```ts
-// `MultiSelect` type definitions
+export type MultiSelectItemId = any;
-type MultiSelectItemId = string;
+export type MultiSelectItemText = string;
-type MultiSelectItemText = string;
-
-interface MultiSelectItem {
+export interface MultiSelectItem {
id: MultiSelectItemId;
text: MultiSelectItemText;
+ disabled?: boolean;
}
```
-| Prop name | Type | Default value | Description |
-| :---------------- | :----------------------------------------------------------------------- | :------------------- | :--------------------------------------------------------------------------------- |
-| items | MultiSelectItem[] | `[]` | Set the multiselect items. |
-| itemToString | (item: MultiSelectItem) => string | -- | Override the display of a multiselect item. |
-| selectedIds | MultiSelectItemId[] | `[]` | Set the selected ids. |
-| value | string | `""` | Specify the multiselect value. |
-| size | "sm" | "lg" | "xl" | -- | Set the size of the combobox. |
-| type | "default" | "inline" | `"default"` | Specify the type of multiselect. |
-| selectionFeedback | "top" | "fixed" | "top-after-reopen" | `"top-after-reopen"` | Specify the selection feedback after selecting items. |
-| disabled | boolean | `false` | Set to `true` to disable the dropdown. |
-| filterable | boolean | `false` | Set to `true` to filter items. |
-| filterItem | (item: MultiSelectItem, value: string) => string | -- | Override the filtering logic. The default filtering is an exact string comparison. |
-| open | boolean | `false` | Set to `true` to open the dropdown. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| locale | string | `"en"` | Specify the locale. |
-| placeholder | string | `""` | Specify the placeholder text. |
-| sortItem | (a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem | -- | Override the sorting logic. The default sorting compare the item text value. |
-| translateWithId | (id: any) => string | -- | Override the default translation ids. |
-| titleText | string | `""` | Specify the title text. |
-| useTitleInItem | boolean | `false` | Set to `true` to pass the item to `itemToString` in the checkbox. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| helperText | string | `""` | Specify the helper text. |
-| label | string | `""` | Specify the list box label. |
-| id | string | -- | Set an id for the list box component. |
-| name | string | -- | Specify a name attribute for the select. |
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| highlightedId | No | let | Yes | null | MultiSelectItemId | null | Id of the highlighted ListBoxMenuItem |
+| selectionRef | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the selection element |
+| fieldRef | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the field box element |
+| multiSelectRef | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the outer div element |
+| inputRef | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the dropdown |
+| value | No | let | Yes | string | "" | Specify the multiselect value |
+| selectedIds | No | let | Yes | ReadonlyArray | [] | Set the selected ids |
+| items | No | let | No | ReadonlyArray | [] | Set the multiselect items |
+| itemToString | No | let | No | (item: MultiSelectItem) => any | (item) => item.text || item.id | Override the display of a multiselect item |
+| itemToInput | No | let | No | (item: MultiSelectItem) => { name?: string; labelText?: any; title?: string; value?: string } | (item) => {} | Override the item name, title, labelText, or value passed to the user-selectable checkbox input as well as the hidden inputs. |
+| size | No | let | No | "sm" | "lg" | "xl" | undefined | Set the size of the combobox |
+| type | No | let | No | "default" | "inline" | "default" | Specify the type of multiselect |
+| direction | No | let | No | "bottom" | "top" | "bottom" | Specify the direction of the multiselect dropdown menu |
+| selectionFeedback | No | let | No | "top" | "fixed" | "top-after-reopen" | "top-after-reopen" | Specify the selection feedback after selecting items |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the dropdown |
+| filterable | No | let | No | boolean | false | Set to `true` to filter items |
+| filterItem | No | let | No | (item: MultiSelectItem, value: string) => boolean | (item, value) => item.text.toLowerCase().includes(value.trim().toLowerCase()) | Override the filtering logic The default filtering is an exact string comparison |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| locale | No | let | No | string | "en" | Specify the locale |
+| placeholder | No | let | No | string | "" | Specify the placeholder text |
+| sortItem | No | let | No | ((a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem) | (() => void) | (a, b) => a.text.localeCompare(b.text, locale, { numeric: true }) | Override the sorting logic The default sorting compare the item text value |
+| translateWithId | No | let | No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string | undefined | Override the chevron icon label based on the open state. Defaults to "Open menu" when closed and "Close menu" when open |
+| translateWithIdSelection | No | let | No | (id: import("../ListBox/ListBoxSelection.svelte").ListBoxSelectionTranslationId) => string | undefined | Override the label of the clear button when the input has a selection. Defaults to "Clear selected item" and "Clear all items" if more than one item is selected |
+| titleText | No | let | No | string | "" | Specify the title text |
+| useTitleInItem | No | let | No | boolean | false | Set to `true` to pass the item to `itemToString` in the checkbox |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| label | No | let | No | string | "" | Specify the list box label |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component |
+| name | No | let | No | string | undefined | Specify a name attribute for the select |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :----------------------------------------------------- | :-------------------------------- |
+| -- | Yes | { item: MultiSelectItem; index: number } | {itemToString(item)} |
+| titleText | No | -- | {titleText} |
-### Forwarded events
+### Events
-- `on:clear`
-- `on:keydown`
-- `on:focus`
-- `on:blur`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------------------------------------------------------------------------------------- |
+| select | dispatched | { selectedIds: MultiSelectItemId[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; } |
+| clear | dispatched | null |
+| blur | dispatched | FocusEvent | CustomEvent |
+| keydown | forwarded | -- |
+| input | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| paste | forwarded | -- |
-### Dispatched events
-
-- `on:select`
-
----
-
-## NotificationActionButton
-
-### Import path
-
-```js
-import { NotificationActionButton } from "carbon-components-svelte";
-```
+## `NotificationActionButton`
### Props
-No exported props.
+None.
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## NotificationButton
-
-### Import path
-
-```js
-import { NotificationButton } from "carbon-components-svelte";
-```
+## `NotificationButton`
### Props
-| Prop name | Type | Default value | Description |
-| :--------------- | :------------------------------------------------------------------ | :------------- | :----------------------------------------------------- |
-| notificationType | "toast" | "inline" | `"toast"` | Set the type of notification. |
-| renderIcon | typeof import("carbon-icons-svelte/lib/Add16").default | -- | Specify the icon from `carbon-icons-svelte` to render. |
-| title | string | -- | Specify the title of the icon. |
-| iconDescription | string | `"Close icon"` | Specify the ARIA label for the icon. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | ------------------------------------ | ------------------------- | ----------------------------------- |
+| notificationType | No | let | No | "toast" | "inline" | "toast" | Set the type of notification |
+| icon | No | let | No | any | undefined | Specify the icon to render |
+| title | No | let | No | string | undefined | Specify the title of the icon |
+| iconDescription | No | let | No | string | "Close icon" | Specify the ARIA label for the icon |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## NotificationIcon
-
-### Import path
-
-```js
-import { NotificationIcon } from "carbon-components-svelte";
-```
+## `NotificationIcon`
### Props
-| Prop name | Type | Default value | Description |
-| :--------------- | :------------------------------------------------------------------------------------------------------------- | :---------------------- | :------------------------------------- |
-| kind | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | `"error"` | Specify the kind of notification icon. |
-| notificationType | "toast" | "inline" | `"toast"` | Set the type of notification. |
-| iconDescription | string | `"Closes notification"` | Specify the ARIA label for the icon. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------------------- |
+| kind | No | let | No | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | "error" | Specify the kind of notification icon |
+| notificationType | No | let | No | "toast" | "inline" | "toast" | Set the type of notification |
+| iconDescription | Yes | let | No | -- | undefined | Specify the ARIA label for the icon |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-No forwarded events.
+None.
-### Dispatched events
+## `NumberInput`
-No dispatched events.
-
----
-
-## NotificationTextDetails
-
-### Import path
-
-```js
-import { NotificationTextDetails } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :--------------- | :----------------------------------- | :------------ | :---------------------------- |
-| notificationType | "toast" | "inline" | `"toast"` | Set the type of notification. |
-| title | string | `"Title"` | Specify the title text. |
-| subtitle | string | `""` | Specify the subtitle text. |
-| caption | string | `"Caption"` | Specify the caption text. |
-
-### Slots
-
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
-
-## NumberInput
-
-### Import path
-
-```js
-import { NumberInput } from "carbon-components-svelte";
-```
-
-### Props
+### Types
```ts
-// `NumberInput` type definitions
-
-type NumberInputTranslationId = "increment" | "decrement";
+export type NumberInputTranslationId = "increment" | "decrement";
```
-| Prop name | Type | Default value | Description |
-| :-------------------------- | :-------------------------------------------------------------- | :---------------------------------------------------- | :---------------------------------------------- |
-| size | "sm" | "xl" | -- | Set the size of the input. |
-| value | string | `""` | Specify the input value. |
-| step | number | `1` | Specify the step increment. |
-| max | number | -- | Specify the maximum value. |
-| min | number | -- | Specify the minimum value. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| readonly | boolean | `false` | Set to `true` for the input to be read-only. |
-| mobile | boolean | `false` | Set to `true` to enable the mobile variant. |
-| allowEmpty | boolean | `false` | Set to `true` to allow for an empty value. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| iconDescription | string | `""` | Specify the ARIA label for the increment icons. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| helperText | string | `""` | Specify the helper text. |
-| label | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| translateWithId | (id: NumberInputTranslationId) => string | -- | Override the default translation ids. |
-| translationIds (`constant`) | { increment: "increment"; decrement: "decrement" } | `{ increment: "increment", decrement: "decrement", }` | Default translation ids. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
-
-### Slots
-
-- **"label"**: `
...
`
-
-### Forwarded events
+### Props
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:input`
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :----------------- | :------- | --------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| value | No | let | Yes | null | number | null | Specify the input value. Use `null` to denote "no value" |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the input |
+| step | No | let | No | number | 1 | Specify the step increment |
+| max | No | let | No | number | undefined | Specify the maximum value |
+| min | No | let | No | number | undefined | Specify the minimum value |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| readonly | No | let | No | boolean | false | Set to `true` for the input to be read-only |
+| allowEmpty | No | let | No | boolean | false | Set to `true` to allow for an empty value |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| hideSteppers | No | let | No | boolean | false | Set to `true` to hide the input stepper buttons |
+| iconDescription | No | let | No | string | "" | Specify the ARIA label for the increment icons |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| label | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| translateWithId | No | let | No | (id: NumberInputTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids |
+| translationIds | No | const | No | { increment: "increment"; decrement: "decrement" } | { increment: "increment", decrement: "decrement", } | Default translation ids |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
-### Dispatched events
+### Slots
-- `on:change`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------- |
+| label | No | -- | {label} |
----
+### Events
-## NumberInputSkeleton
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------ |
+| change | dispatched | null | number |
+| input | dispatched | null | number |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
-### Import path
-
-```js
-import { NumberInputSkeleton } from "carbon-components-svelte";
-```
+## `NumberInputSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------ |
-| hideLabel | boolean | `false` | Set to `true` to hide the label text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
+| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+None.
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## OrderedList
-
-### Import path
-
-```js
-import { OrderedList } from "carbon-components-svelte";
-```
+## `OrderedList`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------------- |
-| nested | boolean | `false` | Set to `true` to use the nested variant. |
-| native | boolean | `false` | Set to `true` to use native list styles. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ---------------------------------------------------- |
+| nested | No | let | No | boolean | false | Set to `true` to use the nested variant |
+| native | No | let | No | boolean | false | Set to `true` to use native list styles |
+| expressive | No | let | No | boolean | false | Set to `true` to use Carbon's expressive typesetting |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## OverflowMenu
-
-### Import path
-
-```js
-import { OverflowMenu } from "carbon-components-svelte";
-```
+## `OutboundLink`
### Props
-| Prop name | Type | Default value | Description |
-| :--------------- | :------------------------------------------------------------------ | :--------------------------------- | :----------------------------------------------------------------- |
-| size | "sm" | "xl" | -- | Specify the size of the overflow menu. |
-| direction | "top" | "bottom" | `"bottom"` | Specify the direction of the overflow menu relative to the button. |
-| open | boolean | `false` | Set to `true` to open the menu. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| flipped | boolean | `false` | Set to `true` to flip the menu relative to the button. |
-| menuOptionsClass | string | -- | Specify the menu options class. |
-| icon | typeof import("carbon-icons-svelte/lib/Add16").default | -- | Specify the icon from `carbon-icons-svelte` to render. |
-| iconClass | string | -- | Specify the icon class. |
-| iconDescription | string | `"Open and close list of options"` | Specify the ARIA label for the icon. |
-| id | string | -- | Set an id for the button element. |
-| buttonRef | null | HTMLButtonElement | `null` | Obtain a reference to the trigger button element. |
-| menuRef | null | HTMLUListElement | `null` | Obtain a reference to the overflow menu element. |
+None.
### Slots
-- **default**: `
...
`
-- **"menu"**: `
...
`
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-- `on:close`
-
----
-
-## OverflowMenuItem
-
-### Import path
-
-```js
-import { OverflowMenuItem } from "carbon-components-svelte";
-```
+## `OverflowMenu`
### Props
-| Prop name | Type | Default value | Description |
-| :----------- | :------------------------------------------------------------------ | :--------------- | :------------------------------------------------------------------------------- |
-| text | string | `"Provide text"` | Specify the item text. Alternatively, use the default slot for a custom element. |
-| href | string | `""` | Specify the `href` attribute if the item is a link. |
-| primaryFocus | boolean | `false` | Set to `true` if the item should be focused when opening the menu. |
-| disabled | boolean | `false` | Set to `true` to disable the item. |
-| hasDivider | boolean | `false` | Set to `true` to include a divider. |
-| danger | boolean | `false` | Set to `true` to use the danger variant. |
-| requireTitle | boolean | `true` | Set to `false` to omit the button `title` attribute. |
-| id | string | -- | Set an id for the top-level element. |
-| ref | null | HTMLAnchorElement | HTMLButtonElement | `null` | Obtain a reference to the HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------- |
+| menuRef | No | let | Yes | null | HTMLUListElement | null | Obtain a reference to the overflow menu element |
+| buttonRef | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the trigger button element |
+| icon | No | let | Yes | any | undefined | Specify the icon to render. Defaults to `<OverflowMenuVertical />` |
+| open | No | let | Yes | boolean | false | Set to `true` to open the menu |
+| size | No | let | No | "sm" | "xl" | undefined | Specify the size of the overflow menu |
+| direction | No | let | No | "top" | "bottom" | "bottom" | Specify the direction of the overflow menu relative to the button |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| flipped | No | let | No | boolean | false | Set to `true` to flip the menu relative to the button |
+| menuOptionsClass | No | let | No | string | undefined | Specify the menu options class |
+| iconClass | No | let | No | string | undefined | Specify the icon class |
+| iconDescription | No | let | No | string | "Open and close list of options" | Specify the ARIA label for the icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the button element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:keydown`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| -- | Yes | -- | -- |
+| menu | No | -- | <svelte:component this={icon} aria-label={iconDescription} title={iconDescription} class="bx--overflow-menu\_\_icon {iconClass}" /> |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------------------------------- |
+| close | dispatched | null | { index: number; text: string; } |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
----
-
-## Pagination
-
-### Import path
-
-```js
-import { Pagination } from "carbon-components-svelte";
-```
+## `OverflowMenuItem`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------------- | :--------------------------------------------------------------- | :------------------ | :------------------------------------------------ |
-| page | number | `1` | Specify the current page index. |
-| totalItems | number | `0` | Specify the total number of items. |
-| disabled | boolean | `false` | Set to `true` to disable the pagination. |
-| forwardText | string | `"Next page"` | Specify the forward button text. |
-| backwardText | string | `"Previous page"` | Specify the backward button text. |
-| itemsPerPageText | string | `"Items per page:"` | Specify the items per page text. |
-| itemText | (min: number, max: number) => string | -- | Override the item text. |
-| itemRangeText | (min: number, max: number, total: number) => string | -- | Override the item range text. |
-| pageInputDisabled | boolean | `false` | Set to `true` to disable the page input. |
-| pageSizeInputDisabled | boolean | `false` | Set to `true` to disable the page size input. |
-| pageSize | number | `10` | Specify the number of items to display in a page. |
-| pageSizes | number[] | `[10]` | Specify the available page sizes. |
-| pagesUnknown | boolean | `false` | Set to `true` if the number of pages is unknown. |
-| pageText | (page: number) => string | -- | Override the page text. |
-| pageRangeText | (current: number, total: number) => string | -- | Override the page range text. |
-| id | string | -- | Set an id for the top-level element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------- | :------- | :--------------- | :------- | ------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | HTMLButtonElement | null | Obtain a reference to the HTML element |
+| primaryFocus | No | let | Yes | boolean | false | Set to `true` if the item should be focused when opening the menu |
+| text | No | let | No | string | "Provide text" | Specify the item text. Alternatively, use the default slot |
+| href | No | let | No | string | "" | Specify the `href` attribute if the item is a link |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the item |
+| hasDivider | No | let | No | boolean | false | Set to `true` to include a divider |
+| danger | No | let | No | boolean | false | Set to `true` to use the danger variant |
+| requireTitle | No | let | No | boolean | true | Set to `false` to omit the button `title` attribute |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-No slots.
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :---------------------------------------------------------------------------------------------------------------- |
+| -- | Yes | -- | <div class:bx--overflow-menu-options\_\_option-content={true}> {text} </div> |
-- `on:update`
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
-## PaginationNav
-
-### Import path
-
-```js
-import { PaginationNav } from "carbon-components-svelte";
-```
+## `Pagination`
### Props
-| Prop name | Type | Default value | Description |
-| :----------- | :------------------- | :---------------- | :----------------------------------------- |
-| page | number | `0` | Specify the current page index. |
-| total | number | `10` | Specify the total number of pages. |
-| shown | number | `10` | Specify the total number of pages to show. |
-| loop | boolean | `false` | Set to `true` to loop the navigation. |
-| forwardText | string | `"Next page"` | Specify the forward button text. |
-| backwardText | string | `"Previous page"` | Specify the backward button text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| pageSize | No | let | Yes | number | 10 | Specify the number of items to display in a page |
+| page | No | let | Yes | number | 1 | Specify the current page index |
+| totalItems | No | let | No | number | 0 | Specify the total number of items |
+| pageWindow | No | let | No | number | 1000 | If `totalItems` is a large number, it can affect the rendering performance of this component since its value is used to calculate the number of pages in the native select dropdown. This value creates a small window of pages rendered around the current page. By default, a maximum of 1000 select items are rendered. |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the pagination |
+| forwardText | No | let | No | string | "Next page" | Specify the forward button text |
+| backwardText | No | let | No | string | "Previous page" | Specify the backward button text |
+| itemsPerPageText | No | let | No | string | "Items per page:" | Specify the items per page text |
+| itemText | No | let | No | (min: number, max: number) => string | (min, max) => \`${min.toLocaleString()}–${max.toLocaleString()} item${max === 1 ? "" : "s"}\` | Override the item text |
+| itemRangeText | No | let | No | (min: number, max: number, total: number) => string | (min, max, total) => \`${min.toLocaleString()}–${max.toLocaleString()} of ${total.toLocaleString()} item${max === 1 ? "" : "s"}\` | Override the item range text |
+| pageInputDisabled | No | let | No | boolean | false | Set to `true` to disable the page input |
+| pageSizeInputDisabled | No | let | No | boolean | false | Set to `true` to disable the page size input |
+| pageSizes | No | let | No | ReadonlyArray | [10] | Specify the available page sizes |
+| pagesUnknown | No | let | No | boolean | false | Set to `true` if the number of pages is unknown |
+| pageText | No | let | No | (page: number) => string | (page) => \`page ${page.toLocaleString()}\` | Override the page text |
+| pageRangeText | No | let | No | (current: number, total: number) => string | (current, total) => \`of ${total.toLocaleString()} page${total === 1 ? "" : "s"}\` | Override the page range text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-No slots.
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-- `on:click:button--previous`
-- `on:click:button--next`
-- `on:change`
+None.
----
+### Events
-## PaginationSkeleton
+| Event name | Type | Detail |
+| :--------------------- | :--------- | :------------------------------------------------ |
+| change | dispatched | { page?: number; pageSize?: number } |
+| click:button--previous | dispatched | { page: number; } |
+| click:button--next | dispatched | { page: number; } |
+| update | dispatched | { pageSize: number; page: number; } |
-### Import path
-
-```js
-import { PaginationSkeleton } from "carbon-components-svelte";
-```
+## `PaginationNav`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ------------------------------------------------------------------------------------------------ | ---------------------------- | ------------------------------------------------------------------- |
+| page | No | let | Yes | number | 1 | Specify the current page index |
+| total | No | let | No | number | 10 | Specify the total number of pages |
+| shown | No | let | No | number | 10 | Specify the total number of pages to show |
+| loop | No | let | No | boolean | false | Set to `true` to loop the navigation |
+| forwardText | No | let | No | string | "Next page" | Specify the forward button text |
+| backwardText | No | let | No | string | "Previous page" | Specify the backward button text |
+| tooltipPosition | No | let | No | "top" | "right" | "bottom" | "left" | "outside" | "inside" | "bottom" | Set the position of the tooltip relative to the pagination buttons. |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
+None.
-## PasswordInput
+### Events
-### Import path
+| Event name | Type | Detail |
+| :--------------------- | :--------- | :----------------------------- |
+| change | dispatched | { page: number; } |
+| click:button--previous | dispatched | { page: number; } |
+| click:button--next | dispatched | { page: number; } |
-```js
-import { PasswordInput } from "carbon-components-svelte";
-```
+## `PaginationSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :---------------- | :-------------------------------------------------------------- | :---------------- | :----------------------------------------------------- |
-| size | "sm" | "xl" | -- | Set the size of the input. |
-| value | string | `""` | Specify the input value. |
-| type | string | `"password"` | Specify the input type. |
-| placeholder | string | `""` | Specify the placeholder text. |
-| hidePasswordLabel | string | `"Hide password"` | Specify the hide password label text. |
-| showPasswordLabel | string | `"Show password"` | Specify the show password label text. |
-| tooltipAlignment | "start" | "center" | "end" | -- | Set the alignment of the tooltip relative to the icon. |
-| tooltipPosition | "top" | "right" | "bottom" | "left" | -- | Set the position of the tooltip relative to the icon. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| helperText | string | `""` | Specify the helper text. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the text for the invalid state. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+None.
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:input`
-- `on:keydown`
-- `on:focus`
-- `on:blur`
-
-### Dispatched events
+None.
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## ProgressIndicator
-
-### Import path
-
-```js
-import { ProgressIndicator } from "carbon-components-svelte";
-```
+## `PasswordInput`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------- | :------------------- | :------------ | :---------------------------------------------------------------------------------------------- |
-| currentIndex | number | `0` | Specify the current step index. |
-| vertical | boolean | `false` | Set to `true` to use the vertical variant. |
-| spaceEqually | boolean | `false` | Set to `true` to specify whether the progress steps should be split equally in size in the div. |
-| preventChangeOnClick | boolean | `false` | Set to `true` to prevent updating `currentIndex`. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| type | No | let | Yes | "text" | "password" | "password" | Set to `"text"` to toggle the password visibility |
+| value | No | let | Yes | number | string | "" | Specify the input value |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the input |
+| placeholder | No | let | No | string | "" | Specify the placeholder text |
+| hidePasswordLabel | No | let | No | string | "Hide password" | Specify the hide password label text |
+| showPasswordLabel | No | let | No | string | "Show password" | Specify the show password label text |
+| tooltipAlignment | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon |
+| tooltipPosition | No | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the position of the tooltip relative to the icon |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the text for the invalid state |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| inline | No | let | No | boolean | false | Set to `true` to use inline version |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
-### Dispatched events
-
-- `on:change`
-
----
-
-## ProgressIndicatorSkeleton
-
-### Import path
-
-```js
-import { ProgressIndicatorSkeleton } from "carbon-components-svelte";
-```
+## `Popover`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------- |
-| vertical | boolean | `false` | Set to `true` to use the vertical variant. |
-| count | number | `4` | Specify the number of steps to render. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------ |
+| open | No | let | Yes | boolean | false | Set to `true` to display the popover |
+| closeOnOutsideClick | No | let | No | boolean | false | Set to `true` to close the popover on an outside click |
+| caret | No | let | No | boolean | false | Set to `true` render a caret |
+| align | No | let | No | "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top" | "top" | Specify the alignment of the caret |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| highContrast | No | let | No | boolean | false | Set to `true` to enable the high contrast variant |
+| relative | No | let | No | boolean | false | Set to `true` to use a relative position |
### Slots
-No slots.
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :------------ | :--------- | :------------------------------------ |
+| click:outside | dispatched | { target: HTMLElement; } |
-No dispatched events.
-
----
-
-## ProgressStep
-
-### Import path
-
-```js
-import { ProgressStep } from "carbon-components-svelte";
-```
+## `ProgressBar`
### Props
-| Prop name | Type | Default value | Description |
-| :------------- | :------------------- | :------------ | :------------------------------------------ |
-| complete | boolean | `false` | Set to `true` for the complete variant. |
-| current | boolean | `false` | Set to `true` to use the current variant. |
-| disabled | boolean | `false` | Set to `true` to disable the progress step. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| description | string | `""` | Specify the step description. |
-| label | string | `""` | Specify the step label. |
-| secondaryLabel | string | `""` | Specify the step secondary label. |
-| id | string | -- | Set an id for the top-level element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |
+| value | No | let | No | number | undefined | Specify the current value |
+| max | No | let | No | number | 100 | Specify the maximum value |
+| kind | No | let | No | "default" | "inline" | "indented" | "default" | Specify the kind of progress bar |
+| status | No | let | No | "active" | "finished" | "error" | "active" | Specify the status |
+| size | No | let | No | "sm" | "md" | "md" | Specify the size |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the progress bar element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Dispatched events
+### Events
-No dispatched events.
+None.
----
-
-## RadioButton
-
-### Import path
-
-```js
-import { RadioButton } from "carbon-components-svelte";
-```
+## `ProgressIndicator`
### Props
-| Prop name | Type | Default value | Description |
-| :------------ | :---------------------------------------- | :------------ | :----------------------------------------------- |
-| value | string | `""` | Specify the value of the radio button. |
-| checked | boolean | `false` | Set to `true` to check the radio button. |
-| disabled | boolean | `false` | Set to `true` to disable the radio button. |
-| labelPosition | "right" | "left" | `"right"` | Specify the label position. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the checkbox input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ---------------------------------------------------------------------------------------------- |
+| currentIndex | No | let | Yes | number | 0 | Specify the current step index |
+| vertical | No | let | No | boolean | false | Set to `true` to use the vertical variant |
+| spaceEqually | No | let | No | boolean | false | Set to `true` to specify whether the progress steps should be split equally in size in the div |
+| preventChangeOnClick | No | let | No | boolean | false | Set to `true` to prevent `currentIndex` from updating |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:change`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| change | dispatched | number |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## RadioButtonGroup
-
-### Import path
-
-```js
-import { RadioButtonGroup } from "carbon-components-svelte";
-```
+## `ProgressIndicatorSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :------------ | :------------------------------------------ | :------------- | :-------------------------------------------- |
-| selected | string | -- | Set the selected radio button value. |
-| disabled | boolean | `false` | Set to `true` to disable the radio buttons. |
-| labelPosition | "right" | "left" | `"right"` | Specify the label position. |
-| orientation | "horizontal" | "vertical" | `"horizontal"` | Specify the orientation of the radio buttons. |
-| id | string | -- | Set an id for the container div element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------- |
+| vertical | No | let | No | boolean | false | Set to `true` to use the vertical variant |
+| count | No | let | No | number | 4 | Specify the number of steps to render |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-- `on:change`
+None.
----
+### Events
-## RadioButtonSkeleton
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Import path
-
-```js
-import { RadioButtonSkeleton } from "carbon-components-svelte";
-```
+## `ProgressStep`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------- | :------- | :--------------- | :------- | -------------------- | ------------------------------------------------ | ------------------------------------------ |
+| current | No | let | Yes | boolean | false | Set to `true` to use the current variant |
+| complete | No | let | Yes | boolean | false | Set to `true` for the complete variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the progress step |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| description | No | let | No | string | "" | Specify the step description |
+| label | No | let | No | string | "" | Specify the step label |
+| secondaryLabel | No | let | No | string | "" | Specify the step secondary label |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :------------------------------------------------------- | :---------------------------------------------------------------------- |
+| -- | Yes | { props: { class: "bx--progress-label" } } | <p class:bx--progress-label={true}>{label}</p> |
-## RadioTile
+### Events
-### Import path
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
-```js
-import { RadioTile } from "carbon-components-svelte";
-```
+## `RadioButton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------- | :----------------- | :-------------------------------------------------------- |
-| checked | boolean | `false` | Set to `true` to check the tile. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| value | string | `""` | Specify the value of the radio input. |
-| tabindex | string | `"0"` | Specify the tabindex. |
-| iconDescription | string | `"Tile checkmark"` | Specify the ARIA label for the radio tile checkmark icon. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the input. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | --------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| checked | No | let | Yes | boolean | false | Set to `true` to check the radio button |
+| value | No | let | No | string | number | "" | Specify the value of the radio button |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the radio button |
+| required | No | let | No | boolean | false | Set to `true` to mark the field as required |
+| labelPosition | No | let | No | "right" | "left" | "right" | Specify the label position |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the radio button input |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:change`
-- `on:keydown`
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| change | forwarded | -- |
-## Row
-
-### Import path
-
-```js
-import { Row } from "carbon-components-svelte";
-```
+## `RadioButtonGroup`
### Props
-| Prop name | Type | Default value | Description |
-| :------------ | :------------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| as | boolean | `false` | Set to `true` to render a custom HTML element. Props are destructured as `props` in the default slot (e.g. <Row let:props><section {...props}>...</section></Row>). |
-| condensed | boolean | `false` | Set to `true` to use the condensed variant. |
-| narrow | boolean | `false` | Set to `true` to use the narrow variant. |
-| noGutter | boolean | `false` | Set to `true` to remove the gutter. |
-| noGutterLeft | boolean | `false` | Set to `true` to remove the left gutter. |
-| noGutterRight | boolean | `false` | Set to `true` to remove the right gutter. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | ------------------------------------------- | ------------------------- | -------------------------------------------------------- |
+| selected | No | let | Yes | string | number | undefined | Set the selected radio button value |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the radio buttons |
+| required | No | let | No | boolean | undefined | Set to `true` to require the selection of a radio button |
+| name | No | let | No | string | undefined | Specify a name attribute for the radio button inputs |
+| legendText | No | let | No | string | "" | Specify the legend text |
+| hideLegend | No | let | No | boolean | false | Set to `true` to visually hide the legend |
+| labelPosition | No | let | No | "right" | "left" | "right" | Specify the label position |
+| orientation | No | let | No | "horizontal" | "vertical" | "horizontal" | Specify the orientation of the radio buttons |
+| id | No | let | No | string | undefined | Set an id for the container div element |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :--------- | :------ | :---- | :------------------------ |
+| -- | Yes | -- | -- |
+| legendText | No | -- | {legendText} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------- |
+| change | dispatched | string | number |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## Search
-
-### Import path
-
-```js
-import { Search } from "carbon-components-svelte";
-```
+## `RadioButtonSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------- | :---------------------------------------- | :--------------------- | :------------------------------------------------------- |
-| small | boolean | `false` | . |
-| size | "sm" | "lg" | "xl" | `"xl"` | Specify the size of the search input. |
-| skeleton | boolean | `false` | Set to `true` to display the skeleton state. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the search input. |
-| value | string | `""` | Specify the value of the search input. |
-| type | string | `"text"` | Specify the `type` attribute of the search input. |
-| placeholder | string | `"Search..."` | Specify the `placeholder` attribute of the search input. |
-| autocomplete | "on" | "off" | `"off"` | Specify the `autocomplete` attribute. |
-| autofocus | boolean | `false` | Set to `true` to auto focus the search element. |
-| closeButtonLabelText | string | `"Clear search input"` | Specify the close button label text. |
-| labelText | string | `""` | Specify the label text. |
-| id | string | -- | Set an id for the input element. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+None.
### Slots
-No slots.
-
-### Forwarded events
+None.
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:input`
-- `on:focus`
-- `on:blur`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-- `on:clear`
-
----
-
-## SearchSkeleton
-
-### Import path
-
-```js
-import { SearchSkeleton } from "carbon-components-svelte";
-```
+## `RadioTile`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :---------------------------------------- | :------------ | :------------------------------------ |
-| small | boolean | `false` | . |
-| size | "sm" | "lg" | "xl" | `"xl"` | Specify the size of the search input. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------- | ------------------------------------------------ | -------------------------------------------------------- |
+| checked | No | let | Yes | boolean | false | Set to `true` to check the tile |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the tile |
+| required | No | let | No | boolean | false | Set to `true` to mark the field as required |
+| value | No | let | No | string | "" | Specify the value of the radio input |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
+| iconDescription | No | let | No | string | "Tile checkmark" | Specify the ARIA label for the radio tile checkmark icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the radio tile input |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| change | forwarded | -- |
+| keydown | forwarded | -- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
----
+## `RecursiveList`
-## Select
+### Types
-### Import path
-
-```js
-import { Select } from "carbon-components-svelte";
+```ts
+export interface RecursiveListNode {
+ text?: string;
+ href?: string;
+ html?: string;
+}
```
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :----------------------------------------- | :------------ | :----------------------------------------------- |
-| selected | string | -- | Specify the selected item value. |
-| size | "sm" | "xl" | -- | Set the size of the select input. |
-| inline | boolean | `false` | Set to `true` to use the inline variant. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the select element. |
-| id | string | -- | Set an id for the select element. |
-| name | string | -- | Specify a name attribute for the select element. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| helperText | string | `""` | Specify the helper text. |
-| noLabel | boolean | `false` | Set to `true` to not render a label. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| ref | null | HTMLSelectElement | `null` | Obtain a reference to the select HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------------------------------------ | ------------------------ | ---------------------------------- |
+| nodes | No | let | No | Array | [] | Specify the nodes to render |
+| type | No | let | No | "unordered" | "ordered" | "ordered-native" | "unordered" | Specify the type of list to render |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:blur`
-
-### Dispatched events
+None.
-- `on:change`
+### Events
----
+None.
-## SelectItem
-
-### Import path
-
-```js
-import { SelectItem } from "carbon-components-svelte";
-```
+## `Row`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------- |
-| value | string | `""` | Specify the option value. |
-| text | string | `""` | Specify the option text. |
-| hidden | boolean | `false` | Set to `true` to hide the option. |
-| disabled | boolean | `false` | Set to `true` to disable the option. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| as | No | let | No | boolean | false | Set to `true` to render a custom HTML element Props are destructured as `props` in the default slot (e.g., <Row let:props><section {...props}>...</section></Row>) |
+| condensed | No | let | No | boolean | false | Set to `true` to use the condensed variant |
+| narrow | No | let | No | boolean | false | Set to `true` to use the narrow variant |
+| noGutter | No | let | No | boolean | false | Set to `true` to remove the gutter |
+| noGutterLeft | No | let | No | boolean | false | Set to `true` to remove the left gutter |
+| noGutterRight | No | let | No | boolean | false | Set to `true` to remove the right gutter |
+| padding | No | let | No | boolean | false | Set to `true` to add top and bottom padding to all columns |
### Slots
-No slots.
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :-------------------------------------------------------------- | :------- |
+| -- | Yes | { props: { class: string; [key: string]: any; } } | -- |
-No forwarded events.
+### Events
-### Dispatched events
+None.
-No dispatched events.
-
----
-
-## SelectItemGroup
-
-### Import path
-
-```js
-import { SelectItemGroup } from "carbon-components-svelte";
-```
+## `Search`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :---------------- | :--------------------------------------------------- |
-| disabled | boolean | `false` | Set to `true` to disable the optgroup element. |
-| label | string | `"Provide label"` | Specify the label attribute of the optgroup element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------- | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| expanded | No | let | Yes | boolean | false | Set to `true to expand the search input |
+| value | No | let | Yes | any | "" | Specify the value of the search input |
+| size | No | let | No | "sm" | "lg" | "xl" | "xl" | Specify the size of the search input |
+| searchClass | No | let | No | string | "" | Specify the class name passed to the outer div element |
+| skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the search input |
+| expandable | No | let | No | boolean | false | Set to `true` to enable the expandable variant |
+| placeholder | No | let | No | string | "Search..." | Specify the `placeholder` attribute of the search input |
+| autocomplete | No | let | No | "on" | "off" | "off" | Specify the `autocomplete` attribute |
+| autofocus | No | let | No | boolean | false | Set to `true` to auto focus the search element |
+| closeButtonLabelText | No | let | No | string | "Clear search input" | Specify the close button label text |
+| labelText | No | let | No | string | "" | Specify the label text |
+| icon | No | let | No | any | undefined | Specify the icon to render. Defaults to `<Search />` |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| expand | dispatched | null |
+| collapse | dispatched | null |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| paste | forwarded | -- |
+| clear | dispatched | null |
----
-
-## SelectSkeleton
-
-### Import path
-
-```js
-import { SelectSkeleton } from "carbon-components-svelte";
-```
+## `SearchSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------ |
-| hideLabel | boolean | `false` | Set to `true` to hide the label text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ----------------------------------------- | ----------------- | ------------------------------------ |
+| size | No | let | No | "sm" | "lg" | "xl" | "xl" | Specify the size of the search input |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+None.
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## SelectableTile
-
-### Import path
-
-```js
-import { SelectableTile } from "carbon-components-svelte";
-```
+## `Select`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :---------------------------------------- | :----------------- | :------------------------------------------------------------- |
-| selected | boolean | `false` | Set to `true` to select the tile. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| title | string | `"title"` | Specify the title of the selectable tile. |
-| value | string | `"value"` | Specify the value of the selectable tile. |
-| tabindex | string | `"0"` | Specify the tabindex. |
-| iconDescription | string | `"Tile checkmark"` | Specify the ARIA label for the selectable tile checkmark icon. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------- |
+| ref | No | let | Yes | null | HTMLSelectElement | null | Obtain a reference to the select HTML element |
+| selected | No | let | Yes | string | number | undefined | Specify the selected item value |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the select input |
+| inline | No | let | No | boolean | false | Set to `true` to use the inline variant |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the select element |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the select element |
+| name | No | let | No | string | undefined | Specify a name attribute for the select element |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| noLabel | No | let | No | boolean | false | Set to `true` to not render a label |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| required | No | let | No | boolean | false | Set to `true` to mark the field as required |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
-
-### Dispatched events
-
-No dispatched events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| -- | Yes | -- | -- |
+| labelText | No | -- | {labelText} |
----
+### Events
-## SideNav
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------- |
+| update | dispatched | string | number |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
-### Import path
-
-```js
-import { SideNav } from "carbon-components-svelte";
-```
+## `SelectItem`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------------ |
-| fixed | boolean | `false` | Set to `true` to use the fixed variant. |
-| ariaLabel | string | -- | Specify the ARIA label for the nav. |
-| isOpen | boolean | `false` | Set to `true` to toggle the expanded state. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ---------------------------------------------------------------------------------- |
+| value | No | let | No | string | number | "" | Specify the option value |
+| text | No | let | No | string | undefined | Specify the option text If not specified, the value will be used as the text. |
+| hidden | No | let | No | boolean | false | Set to `true` to hide the option |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the option |
+| class | No | let | No | string | undefined | Specify the class of the `option` element |
+| style | No | let | No | string | undefined | Specify the style of the `option` element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
-
----
+None.
-## SideNavItems
+### Events
-### Import path
+None.
-```js
-import { SideNavItems } from "carbon-components-svelte";
-```
+## `SelectItemGroup`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ---------------------------- | --------------------------------------------------- |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the optgroup element |
+| label | No | let | No | string | "Provide label" | Specify the label attribute of the optgroup element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-No dispatched events.
+### Events
----
+None.
-## SideNavLink
-
-### Import path
-
-```js
-import { SideNavLink } from "carbon-components-svelte";
-```
+## `SelectSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :--------- | :-------------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------- |
-| isSelected | boolean | `false` | Set to `true` to select the current link. |
-| href | string | -- | Specify the `href` attribute. |
-| text | string | -- | Specify the text. |
-| icon | { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; } | -- | Specify the icon props. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
+| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:click`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## SideNavMenu
-
-### Import path
-
-```js
-import { SideNavMenu } from "carbon-components-svelte";
-```
+## `SelectableTile`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------- | :------------ | :--------------------------------------------- |
-| expanded | boolean | `false` | Set to `true` to toggle the expanded state. |
-| text | string | -- | Specify the text. |
-| icon | { render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; } | -- | Specify the icon props. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the HTML button element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| selected | No | let | Yes | boolean | false | Set to `true` to select the tile |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the tile |
+| title | No | let | No | string | "title" | Specify the title of the selectable tile |
+| value | No | let | No | string | "value" | Specify the value of the selectable tile |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
+| iconDescription | No | let | No | string | "Tile checkmark" | Specify the ARIA label for the selectable tile checkmark icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | "" | Specify a name attribute for the input |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| select | dispatched | string |
+| deselect | dispatched | string |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
-No dispatched events.
-
----
-
-## SideNavMenuItem
-
-### Import path
-
-```js
-import { SideNavMenuItem } from "carbon-components-svelte";
-```
+## `SideNav`
### Props
-| Prop name | Type | Default value | Description |
-| :--------- | :----------------------------------------- | :------------ | :--------------------------------------------- |
-| isSelected | boolean | -- | Set to `true` to select the item. |
-| href | string | -- | Specify the `href` attribute. |
-| text | string | -- | Specify the item text. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the HTML anchor element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | -------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| isOpen | No | let | Yes | boolean | false | Set to `true` to toggle the expanded state |
+| fixed | No | let | No | boolean | false | Set to `true` to use the fixed variant |
+| rail | No | let | No | boolean | false | Set to `true` to use the rail variant |
+| ariaLabel | No | let | No | string | undefined | Specify the ARIA label for the nav |
+| expansionBreakpoint | No | let | No | number | 1056 | The window width (px) at which the SideNav is expanded and the hamburger menu is hidden. 1056 represents the "large" breakpoint in pixels from the Carbon Design System: - small: 320 - medium: 672 - large: 1056 - x-large: 1312 - max: 1584 |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :------------ | :--------- | :---------------- |
+| open | dispatched | null |
+| close | dispatched | null |
+| click:overlay | dispatched | null |
----
-
-## SkeletonPlaceholder
-
-### Import path
-
-```js
-import { SkeletonPlaceholder } from "carbon-components-svelte";
-```
+## `SideNavDivider`
### Props
-No exported props.
+None.
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+None.
-No dispatched events.
+### Events
----
+None.
-## SkeletonText
-
-### Import path
-
-```js
-import { SkeletonText } from "carbon-components-svelte";
-```
+## `SideNavItems`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------------- |
-| lines | number | `3` | Specify the number of lines to render. |
-| heading | boolean | `false` | Set to `true` to use the heading size variant. |
-| paragraph | boolean | `false` | Set to `true` to use the paragraph size variant. |
-| width | string | `"100%"` | Specify the width of the text (% or px). |
+None.
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
----
+### Events
-## SkipToContent
+None.
-### Import path
-
-```js
-import { SkipToContent } from "carbon-components-svelte";
-```
+## `SideNavLink`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :---------------- | :---------------------------- |
-| href | string | `"#main-content"` | Specify the `href` attribute. |
-| tabindex | string | `"0"` | Specify the tabindex. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| isSelected | No | let | No | boolean | false | Set to `true` to select the current link |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+| text | No | let | No | string | undefined | Specify the text |
+| icon | No | let | No | any | undefined | Specify the icon to render |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-
-### Dispatched events
-
-No dispatched events.
-
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :-------------------------------------------------- |
+| -- | Yes | -- | {text} |
+| icon | No | -- | <svelte:component this={icon} /> |
-## Slider
+### Events
-### Import path
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
-```js
-import { Slider } from "carbon-components-svelte";
-```
+## `SideNavMenu`
### Props
-| Prop name | Type | Default value | Description |
-| :------------- | :----------------------------------- | :------------ | :------------------------------------------ |
-| value | number | `0` | Specify the value of the slider. |
-| max | number | `100` | Set the maximum slider value. |
-| maxLabel | string | `""` | Specify the label for the max value. |
-| min | number | `0` | Set the minimum slider value. |
-| minLabel | string | `""` | Specify the label for the min value. |
-| step | number | `1` | Set the step value. |
-| stepMultiplier | number | `4` | Set the step multiplier value. |
-| required | boolean | `false` | Set to `true` to require a value. |
-| inputType | string | `"number"` | Specify the input type. |
-| disabled | boolean | `false` | Set to `true` to disable the slider. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| hideTextInput | boolean | `false` | Set to `true` to hide the text input. |
-| id | string | -- | Set an id for the slider div element. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| labelText | string | `""` | Specify the label text. |
-| name | string | `""` | Set a name for the slider element. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the HTML button element |
+| expanded | No | let | Yes | boolean | false | Set to `true` to toggle the expanded state |
+| text | No | let | No | string | undefined | Specify the text |
+| icon | No | let | No | any | undefined | Specify the icon to render |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :-------------------------------------------------- |
+| -- | Yes | -- | -- |
+| icon | No | -- | <svelte:component this={icon} /> |
-- `on:change`
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
-## SliderSkeleton
-
-### Import path
-
-```js
-import { SliderSkeleton } from "carbon-components-svelte";
-```
+## `SideNavMenuItem`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------ |
-| hideLabel | boolean | `false` | Set to `true` to hide the label text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
+| ref | No | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element |
+| isSelected | No | let | No | boolean | false | Set to `true` to select the item |
+| href | No | let | No | string | undefined | Specify the `href` attribute |
+| text | No | let | No | string | undefined | Specify the item text |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------ |
+| -- | Yes | -- | {text} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## StructuredList
-
-### Import path
-
-```js
-import { StructuredList } from "carbon-components-svelte";
-```
+## `SkeletonPlaceholder`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :---------------------------------------------- |
-| selected | string | -- | Specify the selected structured list row value. |
-| border | boolean | `false` | Set to `true` to use the bordered variant. |
-| selection | boolean | `false` | Set to `true` to use the selection variant. |
+None.
### Slots
-- **default**: `
...
`
-
-### Forwarded events
+None.
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-- `on:change`
-
----
-
-## StructuredListBody
-
-### Import path
-
-```js
-import { StructuredListBody } from "carbon-components-svelte";
-```
+## `SkeletonText`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------- | ----------------------------------------------- |
+| lines | No | let | No | number | 3 | Specify the number of lines to render |
+| heading | No | let | No | boolean | false | Set to `true` to use the heading size variant |
+| paragraph | No | let | No | boolean | false | Set to `true` to use the paragraph size variant |
+| width | No | let | No | string | "100%" | Specify the width of the text (% or px) |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+None.
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
----
-
-## StructuredListCell
-
-### Import path
-
-```js
-import { StructuredListCell } from "carbon-components-svelte";
-```
+## `SkipToContent`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------- |
-| head | boolean | `false` | Set to `true` to use as a header. |
-| noWrap | boolean | `false` | Set to `true` to prevent wrapping. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------- | ---------------------------- | ---------------------------- |
+| href | No | let | No | string | "#main-content" | Specify the `href` attribute |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :-------------------------------- |
+| -- | Yes | -- | Skip to main content |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
-## StructuredListHead
-
-### Import path
-
-```js
-import { StructuredListHead } from "carbon-components-svelte";
-```
+## `Slider`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------- | :------- | :--------------- | :------- | --------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the HTML element |
+| value | No | let | Yes | number | 0 | Specify the value of the slider |
+| max | No | let | No | number | 100 | Set the maximum slider value |
+| maxLabel | No | let | No | string | "" | Specify the label for the max value |
+| min | No | let | No | number | 0 | Set the minimum slider value |
+| minLabel | No | let | No | string | "" | Specify the label for the min value |
+| step | No | let | No | number | 1 | Set the step value |
+| stepMultiplier | No | let | No | number | 4 | Set the step multiplier value |
+| required | No | let | No | boolean | false | Set to `true` to require a value |
+| inputType | No | let | No | string | "number" | Specify the input type |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the slider |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| hideTextInput | No | let | No | boolean | false | Set to `true` to hide the text input |
+| fullWidth | No | let | No | boolean | false | Set to `true` for the slider to span the full width of its containing element. |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the slider div element |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| labelText | No | let | No | string | "" | Specify the label text. Alternatively, use the "labelText" slot (e.g., `<span slot="labelText">...</span>`) |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| name | No | let | No | string | "" | Set a name for the slider element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
----
+### Events
-## StructuredListInput
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| change | dispatched | number |
+| input | dispatched | number |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Import path
-
-```js
-import { StructuredListInput } from "carbon-components-svelte";
-```
+## `SliderSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :---------------------------------------- | :------------ | :-------------------------------------------- |
-| checked | boolean | `false` | Set to `true` to check the input. |
-| title | string | `"title"` | Specify the title of the input. |
-| value | string | `"value"` | Specify the value of the input. |
-| id | string | -- | Set an id for the input element. |
-| name | string | `""` | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
+| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text |
### Slots
-No slots.
-
-### Forwarded events
-
-No forwarded events.
+None.
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
----
-
-## StructuredListRow
-
-### Import path
-
-```js
-import { StructuredListRow } from "carbon-components-svelte";
-```
+## `StructuredList`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------ |
-| head | boolean | `false` | Set to `true` to use as a header. |
-| label | boolean | `false` | Set to `true` to render a label slot. |
-| tabindex | string | `"0"` | Specify the tabindex. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ---------------------- | ---------------------------------------------- |
+| selected | No | let | Yes | string | undefined | Specify the selected structured list row value |
+| condensed | No | let | No | boolean | false | Set to `true` to use the condensed variant |
+| flush | No | let | No | boolean | false | Set to `true` to flush the list |
+| selection | No | let | No | boolean | false | Set to `true` to use the selection variant |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| change | dispatched | string |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## StructuredListSkeleton
-
-### Import path
-
-```js
-import { StructuredListSkeleton } from "carbon-components-svelte";
-```
+## `StructuredListBody`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------- |
-| rows | number | `5` | Specify the number of rows. |
-| border | boolean | `false` | Set to `true` to use the bordered variant. |
+None.
### Slots
-No slots.
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-No dispatched events.
-
----
-
-## Switch
-
-### Import path
-
-```js
-import { Switch } from "carbon-components-svelte";
-```
+## `StructuredListCell`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :----------------------------------------- | :--------------- | :----------------------------------------------------------------------------------------------------------------- |
-| text | string | `"Provide text"` | Specify the switch text. Alternatively, use the named slot "text" (e.g. <span slot="text">...</span>). |
-| selected | boolean | `false` | Set to `true` for the switch to be selected. |
-| disabled | boolean | `false` | Set to `true` to disable the switch. |
-| id | string | -- | Set an id for the button element. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------- |
+| head | No | let | No | boolean | false | Set to `true` to use as a header |
+| noWrap | No | let | No | boolean | false | Set to `true` to prevent wrapping |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
----
-
-## Tab
-
-### Import path
-
-```js
-import { Tab } from "carbon-components-svelte";
-```
+## `StructuredListHead`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :----------------------------------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------- |
-| label | string | `""` | Specify the tab label. Alternatively, use the default slot (e.g. <Tab><span>Label</span></Tab>). |
-| href | string | `"#"` | Specify the href attribute. |
-| disabled | boolean | `false` | Set to `true` to disable the tab. |
-| tabindex | string | `"0"` | Specify the tabindex. |
-| id | string | -- | Set an id for the top-level element. |
-| ref | null | HTMLAnchorElement | `null` | Obtain a reference to the anchor HTML element. |
+None.
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## TabContent
-
-### Import path
-
-```js
-import { TabContent } from "carbon-components-svelte";
-```
+## `StructuredListInput`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :----------------------------------- |
-| id | string | -- | Set an id for the top-level element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | -------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| checked | No | let | Yes | boolean | false | Set to `true` to check the input |
+| title | No | let | No | string | "title" | Specify the title of the input |
+| value | No | let | No | string | "value" | Specify the value of the input |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | "" | Specify a name attribute for the input |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
+None.
----
+### Events
-## Table
+None.
-### Import path
-
-```js
-import { Table } from "carbon-components-svelte";
-```
+## `StructuredListRow`
### Props
-| Prop name | Type | Default value | Description |
-| :--------------- | :-------------------------------------------------- | :------------ | :--------------------------------------- |
-| size | "compact" | "short" | "tall" | -- | Set the size of the table. |
-| zebra | boolean | `false` | Set to `true` to use zebra styles. |
-| useStaticWidth | boolean | `false` | Set to `true` to use static width. |
-| shouldShowBorder | boolean | `false` | Set to `true` for the bordered variant. |
-| sortable | boolean | `false` | Set to `true` for the sortable variant. |
-| stickyHeader | boolean | `false` | Set to `true` to enable a sticky header. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
+| head | No | let | No | boolean | false | Set to `true` to use as a header |
+| label | No | let | No | boolean | false | Set to `true` to render a label slot |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
### Slots
-- **default**: `
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
----
+### Events
-## Tabs
+None.
-### Import path
-
-```js
-import { Tabs } from "carbon-components-svelte";
-```
+## `TableCell`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :---------------------------------------- | :-------------------- | :------------------------------------------- |
-| selected | number | `0` | Specify the selected tab index. |
-| type | "default" | "container" | `"default"` | Specify the type of tabs. |
-| iconDescription | string | `"Show menu options"` | Specify the ARIA label for the chevron icon. |
-| triggerHref | string | `"#"` | Specify the tab trigger href attribute. |
+None.
### Slots
-- **default**: `
...
`
-- **"content"**: `
...
`
-
-### Forwarded events
-
-- `on:keypress`
-- `on:click`
-
-### Dispatched events
-
-- `on:change`
-
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-## TabsSkeleton
+### Events
-### Import path
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-```js
-import { TabsSkeleton } from "carbon-components-svelte";
-```
+## `TableContainer`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :------------------------------------ |
-| count | number | `4` | Specify the number of tabs to render. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------- |
+| title | No | let | No | string | "" | Specify the title of the data table |
+| description | No | let | No | string | "" | Specify the description of the data table |
+| stickyHeader | No | let | No | boolean | false | Set to `true` to enable a sticky header |
+| useStaticWidth | No | let | No | boolean | false | Set to `true` to use static width |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-No dispatched events.
+### Events
----
+None.
-## Tag
-
-### Import path
-
-```js
-import { Tag } from "carbon-components-svelte";
-```
+## `TableHead`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | :------------------------------------------------------ |
-| type | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | -- | Specify the type of tag. |
-| filter | boolean | `false` | Set to `true` to use filterable variant. |
-| disabled | boolean | `false` | Set to `true` to disable a filterable tag. |
-| skeleton | boolean | `false` | Set to `true` to display the skeleton state. |
-| title | string | `"Clear filter"` | Set the title for the close button in a filterable tag. |
-| id | string | -- | Set an id for the filterable tag. |
+None.
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## TagSkeleton
-
-### Import path
-
-```js
-import { TagSkeleton } from "carbon-components-svelte";
-```
+## `TableHeader`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ---------------------------------------------------------- | ------------------------------------------------ | -------------------------------------- |
+| sortable | No | let | No | boolean | false | Set to `true` for the sortable variant |
+| sortDirection | No | let | No | "none" | "ascending" | "descending" | "none" | Specify the sort direction |
+| active | No | let | No | boolean | false | Set to `true` if the column sorting |
+| scope | No | let | No | string | "col" | Specify the `scope` attribute |
+| translateWithId | No | let | No | () => string | () => "" | Override the default id translations |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the top-level element |
### Slots
-No slots.
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| click | forwarded | -- |
-No dispatched events.
-
----
-
-## TextArea
-
-### Import path
-
-```js
-import { TextArea } from "carbon-components-svelte";
-```
+## `TableRow`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------------------------------- | :------------ | :----------------------------------------------- |
-| value | string | `""` | Specify the textarea value. |
-| placeholder | string | `""` | Specify the placeholder text. |
-| cols | number | `50` | Specify the number of cols. |
-| rows | number | `4` | Specify the number of rows. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| helperText | string | `""` | Specify the helper text. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the text for the invalid state. |
-| id | string | -- | Set an id for the textarea element. |
-| name | string | -- | Specify a name attribute for the input. |
-| ref | null | HTMLTextAreaElement | `null` | Obtain a reference to the textarea HTML element. |
+None.
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:input`
-- `on:focus`
-- `on:blur`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
----
-
-## TextAreaSkeleton
-
-### Import path
-
-```js
-import { TextAreaSkeleton } from "carbon-components-svelte";
-```
+## `Tabs`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------------------- |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ----------------------------------------- | -------------------------------- | -------------------------------------------- |
+| selected | No | let | Yes | number | 0 | Specify the selected tab index |
+| type | No | let | No | "default" | "container" | "default" | Specify the type of tabs |
+| autoWidth | No | let | No | boolean | false | Set to `true` for tabs to have an auto-width |
+| iconDescription | No | let | No | string | "Show menu options" | Specify the ARIA label for the chevron icon |
+| triggerHref | No | let | No | string | "#" | Specify the tab trigger href attribute |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
+| content | No | -- | -- |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| change | dispatched | number |
+| keypress | forwarded | -- |
+| click | forwarded | -- |
-## TextInput
-
-### Import path
-
-```js
-import { TextInput } from "carbon-components-svelte";
-```
+## `TabsSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :---------------------------------------- | :------------ | :--------------------------------------------- |
-| size | "sm" | "xl" | -- | Set the size of the input. |
-| value | string | `""` | Specify the input value. |
-| type | string | `""` | Specify the input type. |
-| placeholder | string | `""` | Specify the placeholder text. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| helperText | string | `""` | Specify the helper text. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the input. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| warn | boolean | `false` | Set to `true` to indicate an warning state. |
-| warnText | string | `""` | Specify the warning state text. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
-| required | boolean | `false` | Set to `true` to mark the field as required. |
-| inline | boolean | `false` | Set to `true` to use inline version. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ----------------------------------------- | ---------------------- | ------------------------------------ |
+| count | No | let | No | number | 4 | Specify the number of tabs to render |
+| type | No | let | No | "default" | "container" | "default" | Specify the type of tabs |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:input`
-- `on:keydown`
-- `on:focus`
-- `on:blur`
-
-### Dispatched events
-
-No dispatched events.
+None.
----
+### Events
-## TextInputSkeleton
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Import path
-
-```js
-import { TextInputSkeleton } from "carbon-components-svelte";
-```
+## `Tag`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :------------------------------------ |
-| hideLabel | boolean | `false` | Set to `true` to hide the label text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- |
+| type | No | let | No | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline" | undefined | Specify the type of tag |
+| size | No | let | No | "sm" | "default" | "default" | -- |
+| filter | No | let | No | boolean | false | Set to `true` to use filterable variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable a filterable tag |
+| interactive | No | let | No | boolean | false | Set to `true` to render a `button` element instead of a `div` |
+| skeleton | No | let | No | boolean | false | Set to `true` to display the skeleton state |
+| title | No | let | No | string | "Clear filter" | Set the title for the close button in a filterable tag |
+| icon | No | let | No | any | undefined | Specify the icon to render |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the filterable tag |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
-
-No dispatched events.
-
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :----------------------------------------------------- | :-------------------------------------------------- |
+| -- | Yes | { props: { class: "bx--tag\_\_label" } } | -- |
+| icon | No | -- | <svelte:component this={icon} /> |
-## Tile
+### Events
-### Import path
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| close | dispatched | null |
-```js
-import { Tile } from "carbon-components-svelte";
-```
+## `TagSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------- |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------- | ---------------------- | ----------- |
+| size | No | let | No | "sm" | "default" | "default" | -- |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+None.
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## TileGroup
-
-### Import path
-
-```js
-import { TileGroup } from "carbon-components-svelte";
-```
+## `TextArea`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------------- |
-| selected | string | -- | Specify the selected tile value. |
-| disabled | boolean | `false` | Set to `true` to disable the tile group. |
-| legend | string | `""` | Specify the legend text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | -------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- |
+| ref | No | let | Yes | null | HTMLTextAreaElement | null | Obtain a reference to the textarea HTML element |
+| value | No | let | Yes | null | string | "" | Specify the textarea value. |
+| placeholder | No | let | No | string | "" | Specify the placeholder text |
+| cols | No | let | No | number | 50 | Specify the number of cols |
+| rows | No | let | No | number | 4 | Specify the number of rows |
+| maxCount | No | let | No | number | undefined | Specify the max character count |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| readonly | No | let | No | boolean | false | Set to `true` to use the read-only variant |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the text for the invalid state |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the textarea element |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
-### Dispatched events
-
-- `on:select`
-
----
-
-## TimePicker
-
-### Import path
-
-```js
-import { TimePicker } from "carbon-components-svelte";
-```
+## `TextAreaSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :---------------------------------------- | :------------ | :--------------------------------------------- |
-| size | "sm" | "xl" | -- | Specify the size of the input. |
-| value | string | `""` | Specify the input value. |
-| type | string | `"text"` | Specify the input type. |
-| placeholder | string | `"hh=mm"` | Specify the input placeholder text. |
-| pattern | string | `"(1[012] | [1-9]):[0-5][0-9](\\s)?"` | Specify the `pattern` attribute for the input element. |
-| maxlength | number | `5` | Specify the `maxlength` input attribute. |
-| light | boolean | `false` | Set to `true` to enable the light variant. |
-| disabled | boolean | `false` | Set to `true` to disable the input. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `false` | Set to `true` to visually hide the label text. |
-| invalid | boolean | `false` | Set to `true` to indicate an invalid state. |
-| invalidText | string | `""` | Specify the invalid state text. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the input. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------- |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
+None.
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:input`
-- `on:focus`
-- `on:blur`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-No dispatched events.
-
----
-
-## TimePickerSelect
-
-### Import path
-
-```js
-import { TimePickerSelect } from "carbon-components-svelte";
-```
+## `TextInput`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :----------------------------------------- | :----------------------- | :----------------------------------------------- |
-| value | string | `""` | Specify the select value. |
-| disabled | boolean | `false` | Set to `true` to disable the select. |
-| iconDescription | string | `"Open list of options"` | Specify the ARIA label for the chevron icon. |
-| labelText | string | `""` | Specify the label text. |
-| hideLabel | boolean | `true` | . |
-| id | string | -- | Set an id for the select element. |
-| name | string | -- | Specify a name attribute for the select element. |
-| ref | null | HTMLSelectElement | `null` | Obtain a reference to the select HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | --------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| value | No | let | Yes | null | number | string | "" | Specify the input value.
`value` will be set to `null` if type="number" and the value is empty. |
+| size | No | let | No | "sm" | "xl" | undefined | Set the size of the input |
+| placeholder | No | let | No | string | "" | Specify the placeholder text |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| helperText | No | let | No | string | "" | Specify the helper text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state |
+| warnText | No | let | No | string | "" | Specify the warning state text |
+| required | No | let | No | boolean | false | Set to `true` to mark the field as required |
+| inline | No | let | No | boolean | false | Set to `true` to use the inline variant |
+| readonly | No | let | No | boolean | false | Set to `true` to use the read-only variant |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------------------- |
+| change | dispatched | null | number | string |
+| input | dispatched | null | number | string |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
----
-
-## ToastNotification
-
-### Import path
-
-```js
-import { ToastNotification } from "carbon-components-svelte";
-```
+## `TextInputSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :--------------- | :------------------------------------------------------------------------------------------------------------- | :---------------------- | :----------------------------------------------------------------------- |
-| notificationType | "toast" | "inline" | `"toast"` | Set the type of notification. |
-| kind | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | `"error"` | Specify the kind of notification. |
-| lowContrast | boolean | `false` | Set to `true` to use the low contrast variant. |
-| timeout | number | `0` | Set the timeout duration (ms) to hide the notification after opening it. |
-| role | string | `"alert"` | Set the `role` attribute. |
-| title | string | `"Title"` | Specify the title text. |
-| subtitle | string | `""` | Specify the subtitle text. |
-| caption | string | `"Caption"` | Specify the caption text. |
-| iconDescription | string | `"Closes notification"` | Specify the ARIA label for the icon. |
-| hideCloseButton | boolean | `false` | Set to `true` to hide the close button. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
+| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+None.
-- `on:close`
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-## Toggle
+## `Theme`
-### Import path
+### Types
-```js
-import { Toggle } from "carbon-components-svelte";
+```ts
+export type CarbonTheme = "white" | "g10" | "g80" | "g90" | "g100";
```
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------------- |
-| toggled | boolean | `false` | Set to `true` to toggle the checkbox input. |
-| disabled | boolean | `false` | Set to `true` to disable checkbox input. |
-| labelA | string | `"Off"` | Specify the label for the untoggled state. |
-| labelB | string | `"On"` | Specify the label for the toggled state. |
-| labelText | string | `""` | Specify the label text. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the checkbox input. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------- | :------- | :--------------- | :------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
+| theme | No | let | Yes | CarbonTheme | "white" | Set the current Carbon theme |
+| tokens | No | let | No | { [token: string]: any; } | {} | Customize a theme with your own tokens @see https://carbondesignsystem.com/guidelines/themes/overview#customizing-a-theme |
+| persist | No | let | No | boolean | false | Set to `true` to persist the theme using window.localStorage |
+| persistKey | No | let | No | string | "theme" | Specify the local storage key |
+| render | No | let | No | "toggle" | "select" | undefined | Render a toggle or select dropdown to control the theme |
+| toggle | No | let | No | import("../Toggle/Toggle.svelte").ToggleProps & { themes?: [labelA: CarbonTheme, labelB: CarbonTheme]; } | { themes: ["white", "g100"], labelA: "", labelB: "", labelText: "Dark mode", hideLabel: false, } | Override the default toggle props |
+| select | No | let | No | import("../Select/Select.svelte").SelectProps & { themes?: CarbonTheme[]; } | { themes: themeKeys, labelText: "Themes", hideLabel: false, } | Override the default select props |
### Slots
-No slots.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :------------------------------------ | :------- |
+| -- | Yes | { theme: CarbonTheme; } | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:keyup`
-- `on:focus`
-- `on:blur`
+| Event name | Type | Detail |
+| :--------- | :--------- | :----------------------------------- |
+| update | dispatched | { theme: CarbonTheme; } |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## ToggleSkeleton
-
-### Import path
-
-```js
-import { ToggleSkeleton } from "carbon-components-svelte";
-```
+## `Tile`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :------------------------------- |
-| labelText | string | `""` | Specify the label text. |
-| id | string | -- | Set an id for the input element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ----------------------------------------- |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
### Slots
-No slots.
-
-### Forwarded events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-No dispatched events.
-
----
-
-## ToggleSmall
-
-### Import path
-
-```js
-import { ToggleSmall } from "carbon-components-svelte";
-```
+## `TileGroup`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :----------------------------------------------- |
-| toggled | boolean | `false` | Set to `true` to toggle the checkbox input. |
-| disabled | boolean | `false` | Set to `true` to disable checkbox input. |
-| labelA | string | `"Off"` | Specify the label for the untoggled state. |
-| labelB | string | `"On"` | Specify the label for the toggled state. |
-| labelText | string | `""` | Specify the label text. |
-| id | string | -- | Set an id for the input element. |
-| name | string | -- | Specify a name attribute for the checkbox input. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | -------------------- | ---------------------- | -------------------------------------------------------- |
+| selected | No | let | Yes | string | undefined | Specify the selected tile value |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the tile group |
+| required | No | let | No | boolean | undefined | Set to `true` to require the selection of a radio button |
+| name | No | let | No | string | undefined | Specify a name attribute for the radio button inputs |
+| legend | No | let | No | string | "" | Specify the legend text |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:change`
-- `on:keyup`
-- `on:focus`
-- `on:blur`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Dispatched events
+### Events
-No dispatched events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------ |
+| select | dispatched | string |
----
-
-## ToggleSmallSkeleton
-
-### Import path
-
-```js
-import { ToggleSmallSkeleton } from "carbon-components-svelte";
-```
+## `TimePicker`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------ | :------------ | :------------------------------- |
-| labelText | string | `""` | Specify the label text. |
-| id | string | -- | Set an id for the input element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | ----------------------------------------- | --------------------------------------------------- | ----------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| value | No | let | Yes | string | "" | Specify the input value |
+| size | No | let | No | "sm" | "xl" | undefined | Specify the size of the input |
+| placeholder | No | let | No | string | "hh:mm" | Specify the input placeholder text |
+| pattern | No | let | No | string | "(1[012]|[1-9]):[0-5][0-9](\\s)?" | Specify the `pattern` attribute for the input element |
+| maxlength | No | let | No | number | 5 | Specify the `maxlength` input attribute |
+| light | No | let | No | boolean | false | Set to `true` to enable the light variant |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the input |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state |
+| invalidText | No | let | No | string | "" | Specify the invalid state text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the input |
### Slots
-No slots.
-
-### Forwarded events
-
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| -- | Yes | -- | -- |
+| labelText | No | -- | {labelText} |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
-## Toolbar
-
-### Import path
-
-```js
-import { Toolbar } from "carbon-components-svelte";
-```
+## `TimePickerSelect`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :--------------------------------- | :------------ | :------------------------ |
-| size | "sm" | "default" | `"default"` | Specify the toolbar size. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------- |
+| ref | No | let | Yes | null | HTMLSelectElement | null | Obtain a reference to the select HTML element |
+| value | No | let | Yes | number | string | "" | Specify the select value |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the select |
+| iconDescription | No | let | No | string | "Open list of options" | Specify the ARIA label for the chevron icon |
+| labelText | No | let | No | string | "" | Specify the label text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the select element |
+| name | No | let | No | string | undefined | Specify a name attribute for the select element |
### Slots
-- **default**: `
...
`
-
-### Forwarded events
-
-No forwarded events.
-
-### Dispatched events
-
-No dispatched events.
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| -- | Yes | -- | -- |
+| labelText | No | -- | {labelText} |
----
+### Events
-## ToolbarBatchActions
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Import path
-
-```js
-import { ToolbarBatchActions } from "carbon-components-svelte";
-```
+## `ToastNotification`
### Props
-| Prop name | Type | Default value | Description |
-| :------------------ | :--------------------------------------------- | :------------ | :-------------------------------------- |
-| formatTotalSelected | (totalSelected: number) => string | -- | Override the total items selected text. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------------- | :------- | :--------------- | :------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- |
+| kind | No | let | No | "error" | "info" | "info-square" | "success" | "warning" | "warning-alt" | "error" | Specify the kind of notification |
+| lowContrast | No | let | No | boolean | false | Set to `true` to use the low contrast variant |
+| timeout | No | let | No | number | 0 | Set the timeout duration (ms) to hide the notification after opening it |
+| role | No | let | No | string | "alert" | Set the `role` attribute |
+| title | No | let | No | string | "" | Specify the title text |
+| subtitle | No | let | No | string | "" | Specify the subtitle text |
+| caption | No | let | No | string | "" | Specify the caption text |
+| statusIconDescription | No | let | No | string | kind + " icon" | Specify the ARIA label for the status icon |
+| closeButtonDescription | No | let | No | string | "Close notification" | Specify the ARIA label for the close button |
+| hideCloseButton | No | let | No | boolean | false | Set to `true` to hide the close button |
+| fullWidth | No | let | No | boolean | false | Set to `true` for the notification to span the full width of its containing element. |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :---------------------- |
+| -- | Yes | -- | -- |
+| caption | No | -- | {caption} |
+| subtitle | No | -- | {subtitle} |
+| title | No | -- | {title} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------- |
+| close | dispatched | { timeout: boolean } |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
+## `Toggle`
-No dispatched events.
+### Props
----
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------- | ------------------------------------------------ | ----------------------------------------------- |
+| toggled | No | let | Yes | boolean | false | Set to `true` to toggle the checkbox input |
+| size | No | let | No | "default" | "sm" | "default" | Specify the toggle size |
+| disabled | No | let | No | boolean | false | Set to `true` to disable checkbox input |
+| labelA | No | let | No | string | "Off" | Specify the label for the untoggled state |
+| labelB | No | let | No | string | "On" | Specify the label for the toggled state |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
+| name | No | let | No | string | undefined | Specify a name attribute for the checkbox input |
-## ToolbarContent
+### Slots
-### Import path
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelA | No | -- | {labelA} |
+| labelB | No | -- | {labelB} |
+| labelText | No | -- | {labelText} |
-```js
-import { ToolbarContent } from "carbon-components-svelte";
-```
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :--------------------------------- |
+| toggle | dispatched | { toggled: boolean; } |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| change | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+
+## `ToggleSkeleton`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------- | ------------------------------------------------ | ------------------------------- |
+| size | No | let | No | "default" | "sm" | "default" | Specify the toggle size |
+| labelText | No | let | No | string | "" | Specify the label text |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element |
### Slots
-- **default**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :----------------------- |
+| labelText | No | -- | {labelText} |
-### Forwarded events
+### Events
-No forwarded events.
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-### Dispatched events
+## `Toolbar`
-No dispatched events.
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------- | ---------------------- | ------------------------ |
+| size | No | let | No | "sm" | "default" | "default" | Specify the toolbar size |
----
+### Slots
-## ToolbarMenu
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Import path
+### Events
-```js
-import { ToolbarMenu } from "carbon-components-svelte";
-```
+None.
+
+## `ToolbarBatchActions`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------ | :------- | :--------------- | :------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------- |
+| active | No | let | Yes | undefined | boolean | undefined | Use a boolean to show or hide the toolbar |
+| formatTotalSelected | No | let | No | (totalSelected: number) => string | (totalSelected) => \`${totalSelected} item${totalSelected === 1 ? "" : "s"} selected\` | Override the total items selected text |
### Slots
-- **default**: `
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Forwarded events
+### Events
-- `on:click`
-- `on:keydown`
+None.
-### Dispatched events
+## `ToolbarMenuItem`
-No dispatched events.
+### Props
----
+None.
-## ToolbarSearch
+### Slots
-### Import path
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-```js
-import { ToolbarSearch } from "carbon-components-svelte";
-```
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| keydown | forwarded | -- |
+
+## `ToolbarSearch`
### Props
-| Prop name | Type | Default value | Description |
-| :--------- | :---------------------------------------- | :------------ | :--------------------------------------------- |
-| value | string | `""` | Specify the value of the search input. |
-| expanded | boolean | `false` | Set to `true` to expand the search bar. |
-| persistent | boolean | `false` | Set to `true` to keep the search bar expanded. |
-| tabindex | string | `"0"` | Specify the tabindex. |
-| ref | null | HTMLInputElement | `null` | Obtain a reference to the input HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :--------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element |
+| filteredRowIds | No | let | Yes | ReadonlyArray | [] | The filtered row ids |
+| expanded | No | let | Yes | boolean | false | Set to `true` to expand the search bar |
+| value | No | let | Yes | number | string | "" | Specify the value of the search input |
+| persistent | No | let | No | boolean | false | Set to `true` to keep the search bar expanded |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the search bar |
+| shouldFilterRows | No | let | No | boolean | ((row: import("./DataTable.svelte").DataTableRow, value: number | string) => boolean) | false | Set to `true` to filter table rows using the search value.
If `true`, the default search excludes `id`, `cells` fields and only does a basic comparison on string and number type cell values.
To implement your own client-side filtering, pass a function that accepts a row and value and returns a boolean. |
+| tabindex | No | let | No | string | "0" | Specify the tabindex |
### Slots
-No slots.
+None.
-### Forwarded events
+### Events
-- `on:change`
-- `on:input`
-- `on:focus`
-- `on:blur`
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| clear | dispatched | null |
+| change | forwarded | -- |
+| input | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| keyup | forwarded | -- |
+| keydown | forwarded | -- |
+| paste | forwarded | -- |
-### Dispatched events
+## `Tooltip`
-No dispatched events.
+### Props
----
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| refIcon | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the icon HTML element |
+| refTooltip | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the tooltip HTML element |
+| ref | No | let | Yes | null | HTMLDivElement | null | Obtain a reference to the trigger text HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the tooltip |
+| align | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon |
+| direction | No | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the direction of the tooltip relative to the button |
+| hideIcon | No | let | No | boolean | false | Set to `true` to hide the tooltip icon |
+| icon | No | let | No | any | undefined | Specify the icon to render for the tooltip button. Default to `<Information />` |
+| iconDescription | No | let | No | string | "" | Specify the ARIA label for the tooltip button |
+| iconName | No | let | No | string | "" | Specify the icon name attribute |
+| tabindex | No | let | No | string | "0" | Set the button tabindex |
+| tooltipId | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the tooltip |
+| triggerId | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the tooltip button |
+| triggerText | No | let | No | string | "" | Set the tooltip button text |
-## Tooltip
+### Slots
-### Import path
+| Slot name | Default | Props | Fallback |
+| :---------- | :------ | :---- | :------------------------------------------------------------------ |
+| -- | Yes | -- | -- |
+| icon | No | -- | <svelte:component this={icon} name={iconName} /> |
+| triggerText | No | -- | {triggerText} |
-```js
-import { Tooltip } from "carbon-components-svelte";
-```
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| open | dispatched | null |
+| close | dispatched | null |
+| click | forwarded | -- |
+| mousedown | forwarded | -- |
+
+## `TooltipDefinition`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------------------------------------------------------------- |
-| direction | "top" | "right" | "bottom" | "left" | `"bottom"` | Set the direction of the tooltip relative to the button. |
-| open | boolean | `false` | Set to `true` to open the tooltip. |
-| hideIcon | boolean | `false` | Set to `true` to hide the tooltip icon. |
-| icon | typeof import("carbon-icons-svelte/lib/Add16").default | -- | Specify the icon from `carbon-icons-svelte` to render for the tooltip button. Icon size must be 16px (e.g. `Add16`, `Task16`). |
-| iconDescription | string | `""` | Specify the ARIA label for the tooltip button. |
-| iconName | string | `""` | Specify the icon name attribute. |
-| tabindex | string | `"0"` | Set the button tabindex. |
-| tooltipId | string | -- | Set an id for the tooltip. |
-| triggerId | string | -- | Set an id for the tooltip button. |
-| triggerText | string | `""` | Set the tooltip button text. |
-| ref | null | HTMLElement | `null` | Obtain a reference to the trigger text HTML element. |
-| refTooltip | null | HTMLElement | `null` | Obtain a reference to the tooltip HTML element. |
-| refIcon | null | HTMLElement | `null` | Obtain a reference to the icon HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | ------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------- |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element |
+| open | No | let | Yes | boolean | false | Set to `true` to open the tooltip |
+| tooltipText | No | let | No | string | "" | Specify the tooltip text |
+| align | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon |
+| direction | No | let | No | "top" | "bottom" | "bottom" | Set the direction of the tooltip relative to the icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the tooltip div element |
### Slots
-- **default**: `
...
`
-- **"triggerText"**: `
...
`
-- **"icon"**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------------------------- |
+| -- | Yes | -- | -- |
+| tooltip | No | -- | {tooltipText} |
+
+### Events
-### Forwarded events
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| open | dispatched | null |
+| close | dispatched | null |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| focus | forwarded | -- |
-No forwarded events.
+## `TooltipFooter`
-### Dispatched events
+### Props
+
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------------- | :------- | :--------------- | :------- | ------------------- | ---------------------------------------------- | --------------------------------------------------------------------------- |
+| selectorPrimaryFocus | No | let | No | string | "a[href], button:not([disabled])" | Specify a selector to be focused inside the footer when opening the tooltip |
-No dispatched events.
+### Slots
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-## TooltipDefinition
+### Events
-### Import path
+None.
-```js
-import { TooltipDefinition } from "carbon-components-svelte";
-```
+## `TooltipIcon`
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :------------------------------------------------ | :------------ | :----------------------------------------------------- |
-| tooltipText | string | `""` | Specify the tooltip text. |
-| align | "start" | "center" | "end" | `"center"` | Set the alignment of the tooltip relative to the icon. |
-| direction | "top" | "bottom" | `"bottom"` | Set the direction of the tooltip relative to the icon. |
-| id | string | -- | Set an id for the tooltip div element. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :---------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------ |
+| ref | No | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element |
+| tooltipText | No | let | No | string | "" | Specify the tooltip text. Alternatively, use the "tooltipText" slot |
+| icon | No | let | No | any | undefined | Specify the icon to render |
+| disabled | No | let | No | boolean | false | Set to `true` to disable the tooltip icon |
+| align | No | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon |
+| direction | No | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the direction of the tooltip relative to the icon |
+| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the span element |
### Slots
-- **default**: `
...
`
-- **"tooltip"**: `
...
`
+| Slot name | Default | Props | Fallback |
+| :---------- | :------ | :---- | :-------------------------------------------------- |
+| -- | Yes | -- | <svelte:component this={icon} /> |
+| tooltipText | No | -- | {tooltipText} |
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:focus`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| focus | forwarded | -- |
-### Dispatched events
+## `TreeView`
-No dispatched events.
+### Types
----
+```ts
+export type TreeNodeId = string | number;
-## TooltipIcon
-
-### Import path
-
-```js
-import { TooltipIcon } from "carbon-components-svelte";
+export interface TreeNode {
+ id: TreeNodeId;
+ text: any;
+ icon?: any;
+ disabled?: boolean;
+ nodes?: TreeNode[];
+}
```
### Props
-| Prop name | Type | Default value | Description |
-| :---------- | :-------------------------------------------------------------- | :------------ | :----------------------------------------------------- |
-| tooltipText | string | `""` | Specify the tooltip text. |
-| align | "start" | "center" | "end" | `"center"` | Set the alignment of the tooltip relative to the icon. |
-| direction | "top" | "right" | "bottom" | "left" | `"bottom"` | Set the direction of the tooltip relative to the icon. |
-| id | string | -- | Set an id for the span element. |
-| ref | null | HTMLButtonElement | `null` | Obtain a reference to the button HTML element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :-------------------- | :------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| expandedIds | No | let | Yes | ReadonlyArray | [] | Set the node ids to be expanded |
+| selectedIds | No | let | Yes | ReadonlyArray | [] | Set the node ids to be selected |
+| activeId | No | let | Yes | TreeNodeId | "" | Set the current active node id Only one node can be active |
+| nodes | No | let | No | Array | [] | Provide an array of nodes to render |
+| size | No | let | No | "default" | "compact" | "default" | Specify the TreeView size |
+| labelText | No | let | No | string | "" | Specify the label text |
+| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text |
+| expandAll | No | function | No | () => void | () => { expandedIds = [...nodeIds]; } | Programmatically expand all nodes |
+| collapseAll | No | function | No | () => void | () => { expandedIds = []; } | Programmatically collapse all nodes |
+| expandNodes | No | function | No | (filterId?: (node: TreeNode) => boolean) => void | () => { expandedIds = flattenedNodes .filter( (node) => filterNode(node) || node.nodes?.some((child) => filterNode(child) && child.nodes), ) .map((node) => node.id); } | Programmatically expand a subset of nodes. Expands all nodes if no argument is provided |
+| collapseNodes | No | function | No | (filterId?: (node: TreeNode) => boolean) => void | () => { expandedIds = flattenedNodes .filter((node) => expandedIds.includes(node.id) && !filterNode(node)) .map((node) => node.id); } | Programmatically collapse a subset of nodes. Collapses all nodes if no argument is provided |
+| showNode | No | function | No | (id: TreeNodeId) => void | () => { for (const child of nodes) { const nodes = findNodeById(child, id); if (nodes) { const ids = nodes.map((node) => node.id); const nodeIds = new Set(ids); expandNodes((node) => nodeIds.has(node.id)); const lastId = ids[ids.length - 1]; activeId = lastId; selectedIds = [lastId]; tick().then(() => { ref?.querySelector(\`[id="${lastId}"]\`)?.focus(); }); break; } } } | Programmatically show a node by `id`. The matching node will be expanded, selected, and focused |
### Slots
-- **default**: `
+
-
- Carbon Components Svelte
- v{process.env.VERSION || ''}
+
+ Carbon Components Svelte v{process.env.VERSION || ""}
-
+ {
+ $goto(e.detail.selectedResult.href);
+ }}
+ />
-
+ Carbon Svelte portfolio
-
+
Carbon Icons Svelte
Carbon Pictograms Svelte
@@ -195,6 +181,11 @@
>
Carbon Charts Svelte
+
+ Carbon Preprocess Svelte
+ Resources
Carbon Design System
@@ -207,31 +198,56 @@
-
+
-
- {#each components.children as child, i (child.path)}
-
- {/each}
-
-
- {#each recipes.children as child, i (child.path)}
-
- {/each}
-
+ {#each components.children.filter((child) => !deprecated.includes(child.title)) as child (child.path)}
+
+ {child.title}
+ {#if deprecated.includes(child.title)}
+
+ Deprecated
+
+ {/if}
+ {#if new_components.includes(child.title)}
+
+ New
+
+ {/if}
+
+ {/each}
-
+
+
diff --git a/docs/src/pages/components/Accordion.svx b/docs/src/pages/components/Accordion.svx
index eabc4972..a42735db 100644
--- a/docs/src/pages/components/Accordion.svx
+++ b/docs/src/pages/components/Accordion.svx
@@ -10,7 +10,14 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
import Preview from "../../components/Preview.svelte";
-### Default
+`Accordion` creates a vertically stacked list of expandable sections that show or hide content. It supports custom titles, different sizes, and various states including disabled and skeleton loading.
+
+## Default
+
+Use the `Accordion` and `AccordionItem` components to compose a collapsible list of
+items.
+
+By default, the chevron icon is on the right side of the accordion item.
@@ -25,7 +32,11 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Chevron aligned left
+## Left-aligned chevron
+
+The chevron icon can be aligned to the left side of the accordion item by setting
+the `align` prop to "start". This provides an alternative visual style while
+maintaining the same functionality.
@@ -40,34 +51,40 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Custom title slot
+## Custom title slot
+
+Customize the title content by using the `title` slot instead of the `title` prop.
+This allows for more complex title layouts with multiple elements.
-
+
Natural Language Classifier
AI / Machine Learning
-
+
Natural Language Classifier uses advanced natural language processing and machine learning techniques to create custom classification models. Users train their data and the service predicts the appropriate category for the inputted text.
-
+
Natural Language Understanding
AI / Machine Learning
-
+
Analyze text to extract meta-data from content such as concepts, entities, emotion, relations, sentiment and more.
-
+
Language Translator
AI / Machine Learning
-
+
Translate text, documents, and websites from one language to another. Create industry or region-specific translations via the service's customization capability.
-### First item open
+## First item open
+
+Set the `open` prop on an `AccordionItem` to have it expanded by default when the
+accordion is first rendered.
@@ -82,7 +99,19 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Extra-large size
+## Programmatic example
+
+This example demonstrates how to programmatically control the accordion items using
+the `bind:open` directive. Expand and collapse items based on user
+interactions or application state.
+
+
+
+## Extra-large size
+
+The accordion can be displayed in an extra-large size by setting the `size` prop to
+"xl". This provides more visual emphasis and is suitable for prominent content
+sections.
@@ -97,7 +126,11 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Small size
+## Small size
+
+For more compact layouts, set the `size` prop to "sm" to display the accordion in a
+smaller size. This is useful when space is limited or when the accordion is used as
+a secondary UI element.
@@ -112,7 +145,10 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Disabled
+## Disabled
+
+Set the `disabled` prop on the `Accordion` component to disable all items at once.
+This prevents users from expanding or collapsing any items in the accordion.
@@ -127,7 +163,11 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Disabled (item)
+## Disabled (item)
+
+Individual accordion items can be disabled by setting the `disabled` prop on
+specific `AccordionItem` components. This allows for more granular control over
+which items are interactive.
@@ -142,27 +182,47 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
-### Skeleton
+## Skeleton
+
+The skeleton state provides a loading placeholder for the accordion. It displays a
+simplified version of the component while content is being loaded.
-### Skeleton (chevron aligned left)
+## Skeleton (left-aligned chevron)
+
+The skeleton state can be combined with the left-aligned chevron style by setting
+both the `skeleton` and `align="start"` props.
-### Skeleton (custom count)
+## Skeleton (custom count)
+
+By default, the skeleton state displays 4 items.
+
+Specify the number of skeleton items to display using the `count` prop. This is
+useful when you know the exact number of items that will be loaded.
-### Skeleton (closed)
+## Skeleton (closed)
+
+By default, the first skeleton item is open. The skeleton state can be displayed
+in a collapsed state by setting `open={false}`.
-### Skeleton (extra-large)
+## Skeleton (extra-large)
+
+The skeleton state supports the extra-large size variant, maintaining visual
+consistency with the active component states.
-### Skeleton (small)
+## Skeleton (small)
+
+The skeleton state also supports the small size variant, providing a compact
+loading placeholder for space-constrained layouts.
diff --git a/docs/src/pages/components/AspectRatio.svx b/docs/src/pages/components/AspectRatio.svx
index 46dd8819..0793fca9 100644
--- a/docs/src/pages/components/AspectRatio.svx
+++ b/docs/src/pages/components/AspectRatio.svx
@@ -3,53 +3,67 @@
import Preview from "../../components/Preview.svelte";
-The `AspectRatio` component is useful for constraining fluid content within an aspect ratio. To demo this, resize your browser for the examples below.
+The `AspectRatio` component maintains consistent proportions for content across different screen sizes. It's particularly useful for images, videos, and other media that need to preserve their aspect ratio when resizing.
-Supported aspect ratios: `"2x1"`, `"16x9"`, `"4x3"`, `"1x1"`, `"3x4"`, `"9x16"`, `"1x2"`
+Supported aspect ratios include `"2x1"`, `"2x3"`, `"16x9"`, `"4x3"`, `"1x1"`, `"3x4"`, `"3x2"`, `"9x16"` and `"1x2"`.
-### Default (2x1)
+## Default
-
+Display a 2:1 aspect ratio container by default.
+
+
2x1
-### Ratio 16x9
+## Ratio 2x3
-
+
+ 2x3
+
+
+## Ratio 16x9
+
+
16x9
-### Ratio 4x3
+## Ratio 4x3
-
+
4x3
-### Ratio 1x1
+## Ratio 1x1
-
+
1x1
-### Ratio 3x4
+## Ratio 3x4
-
+
3x4
-### Ratio 9x16
+## Ratio 3x2
-
+
+ 3x2
+
+
+## Ratio 9x16
+
+
9x16
-### Ratio 1x2
+## Ratio 1x2
-
+
1x2
-### Tile (16x9)
+## Tile (16x9)
Content
diff --git a/docs/src/pages/components/Breadcrumb.svx b/docs/src/pages/components/Breadcrumb.svx
index d6d3c17b..f491e5e0 100644
--- a/docs/src/pages/components/Breadcrumb.svx
+++ b/docs/src/pages/components/Breadcrumb.svx
@@ -6,13 +6,17 @@ components: ["Breadcrumb", "BreadcrumbItem"]
import {
Breadcrumb,
BreadcrumbItem,
+ OverflowMenu,
+ OverflowMenuItem
} from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
-See the [Breadcrumbs recipe](/recipes/Breadcrumbs) for building a reusable breadcrumbs component.
+`Breadcrumb` displays a hierarchical navigation trail that shows users their current location within an application. It supports current page indication, trailing slash customization, and overflow handling for long navigation paths.
-### Default
+## Default
+
+Display a hierarchical navigation trail with slashes between items. Mark the current page with `isCurrentPage`.
Dashboard
@@ -20,13 +24,37 @@ See the [Breadcrumbs recipe](/recipes/Breadcrumbs) for building a reusable bread
2019
-### No trailing slash
+## No trailing slash
+
+Remove the trailing slash from the last breadcrumb item using `noTrailingSlash`.
HomeProfile
-### Skeleton
+## Overflow menu
+
+Add an `OverflowMenu` to handle long breadcrumb trails. Use `OverflowMenuItem` components for menu options.
+
+
+ Home
+ API documentation
+
+
+
+
+
+
+ Usage
+
+
+## Breadcrumb trail
+
+
+
+## Skeleton
+
+Display a loading state with `skeleton` prop. Use `count` to specify the number of items.
\ No newline at end of file
diff --git a/docs/src/pages/components/Breakpoint.svx b/docs/src/pages/components/Breakpoint.svx
new file mode 100644
index 00000000..c4245ae1
--- /dev/null
+++ b/docs/src/pages/components/Breakpoint.svx
@@ -0,0 +1,35 @@
+
+
+
+The Carbon Design System [grid implementation](https://carbondesignsystem.com/guidelines/2x-grid/implementation#responsive-options) defines five responsive breakpoints:
+
+
+ Small: less than 672px
+ Medium: 672 - 1056px
+ Large: 1056 - 1312px
+ X-Large: 1312 - 1584px
+ Max: greater than 1584px
+
+
+This utility component uses the [Window.matchMedia API](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) to declaratively determine the current Carbon breakpoint size.
+
+## Default
+
+Bind to the `size` prop to determine the current breakpoint size. Possible values include: `"sm" | "md" | "lg" | "xlg" | "max"`.
+
+The `"on:change"` event will fire when the size is initially determined and when a breakpoint change event occurs (e.g., the browser width is resized).
+
+
+
+## Store and Breakpoint Values
+
+Use `breakpointObserver` as an alternative to the component to get the current size as a Svelte store. The store provides two additional functions that create derived stores returning a `boolean` indicating whether the size is smaller/larger than a certain breakpoint.
+
+Access the `breakpoints` dictionary to map from `BreakpointSize` to `BreakpointValue`.
+
+
diff --git a/docs/src/pages/components/Button.svx b/docs/src/pages/components/Button.svx
index 10229c14..f0c7de69 100644
--- a/docs/src/pages/components/Button.svx
+++ b/docs/src/pages/components/Button.svx
@@ -1,60 +1,126 @@
----
-description: High-level description
----
-
-### Primary button
+Buttons trigger actions in the interface. Use them to submit forms, navigate between pages, or perform specific tasks. Choose from different styles and sizes to match the importance and context of each action.
+
+## Primary button
+
+The default button style is primary. This should be used for primary actions.
-### Secondary button
+## Secondary button
+
+Set `kind="secondary"` for secondary actions.
-### Tertiary button
+## Tertiary button
+
+Set `kind="tertiary"` for tertiary actions.
-### Ghost button
+## Ghost button
+
+Set `kind="ghost"` for ghost-style buttons.
-### Danger button
+## Danger button
+
+Set `kind="danger"` for destructive actions.
-### Danger tertiary button
+## Danger tertiary button
+
+Set `kind="danger-tertiary"` for less prominent destructive actions.
-### Danger ghost button
+## Danger tertiary, icon-only button
+
+
+
+ Provide an iconDescription for accessibility. This text will be used as the button's tooltip and screen reader label.
+
+
+
+
+
+## Danger ghost button
+
+Set `kind="danger-ghost"` for ghost-style destructive actions.
-### Button with icon
+## Button with icon
-
+Add an icon to the button using the `icon` prop.
-### Icon-only button
+
-
+## Icon-only button
-### Link button
+
+
+ Provide an iconDescription for accessibility. This text will be used as the button's tooltip and screen reader label.
+
+
+
+
+
+## Icon-only, link button
+
+Set `href` to create an icon-only link button.
+
+
+
+## Icon-only button (custom tooltip position)
+
+Control the tooltip position and alignment with `tooltipPosition` and `tooltipAlignment`.
+
+
+
+## Selected icon-only, ghost button
+
+Set `isSelected` to `true` to enable the selected state for an icon-only, ghost button.
+
+
+
+## Link button
+
+Set `href` to render an [anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) instead of a `button` element.
-### Custom element
+## Link button with icon
+
+Similarly, link buttons can have icons.
+
+
+
+## Custom element
+
+By default, the `Button` will render either a `button` or `a` element.
+
+To render a different element, set `as` to `true` and spread `let:props` to the element.
-### Field button
+## Field size
+
+The default size is "default".
+
+Set `size="field"` for field-sized buttons.
@@ -62,7 +128,9 @@ description: High-level description
-### Small button
+## Small size
+
+Set `size="small"` for small buttons.
@@ -70,12 +138,73 @@ description: High-level description
-### Disabled button
+## Large size
+
+Set `size="lg"` for large buttons.
+
+
+
+
+
+
+
+## Extra-large size
+
+Set `size="xl"` for extra-large buttons.
+
+
+
+
+
+
+
+## Disabled state
+
+Set `disabled` to disable the button.
+
-### Skeleton
+## Expressive styles
+Set `expressive` to `true` to use Carbon's expressive typesetting.
+
+
+
+ Use expressive styles with default, "lg", or "xl" button sizes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Skeleton
+
+Set `skeleton` to show a loading state.
+
+
+
-
\ No newline at end of file
+
+
+## Programmatic focus
+
+Bind to the `ref` prop to access the button element for programmatic focus.
+
+
diff --git a/docs/src/pages/components/ButtonSet.svx b/docs/src/pages/components/ButtonSet.svx
index 702d154c..4c66e526 100644
--- a/docs/src/pages/components/ButtonSet.svx
+++ b/docs/src/pages/components/ButtonSet.svx
@@ -1,23 +1,25 @@
----
-source: Button/ButtonSet.svelte
----
-
-### Default (juxtaposed)
+Group related buttons together in a set. Use this component to create consistent spacing and alignment between multiple buttons.
+
+## Default
+
+Place buttons side by side in a horizontal layout.
-### Stacked
+## Stacked
+
+Set `stacked` to `true` to arrange buttons vertically.
-
+
\ No newline at end of file
diff --git a/docs/src/pages/components/Checkbox.svx b/docs/src/pages/components/Checkbox.svx
index 8bbd26c4..8e66285a 100644
--- a/docs/src/pages/components/Checkbox.svx
+++ b/docs/src/pages/components/Checkbox.svx
@@ -1,28 +1,62 @@
-### Default (unchecked)
+Checkboxes let users select one or more options from a list. Use them for multiple-choice questions, settings, or to confirm actions.
+
+## Default
+
+Create a checkbox with a label using `labelText`.
+
+By default, the checkbox is unchecked.
-### Checked
+## Checked
+
+Set `checked` to `true` to pre-select the checkbox.
-### Indeterminate
+## Indeterminate
+
+Set `indeterminate` to `true` to show a mixed state, typically used in parent checkboxes with some children selected.
-### Hidden label
+## Hidden label
+
+Set `hideLabel` to `true` to visually hide the label while keeping it accessible to screen readers.
-### Disabled
+## Disabled state
+
+Set `disabled` to `true` to prevent user interaction.
-### Skeleton
+## Reactive example (bind:checked)
-
\ No newline at end of file
+Use two-way binding with `bind:checked` to track the checkbox state.
+
+
+
+## Reactive example (bind:group)
+
+Bind an array of values using `group` to manage multiple checkboxes. This API is inspired by Svelte [group inputs](https://svelte.dev/tutorial/group-inputs).
+
+
+
+ When using bind:group, bind:checked only supports one-way binding.
+
+
+
+
+
+## Skeleton
+
+Set `skeleton` to `true` to show a loading state.
+
+
diff --git a/docs/src/pages/components/ClickableTile.svx b/docs/src/pages/components/ClickableTile.svx
index 4535df18..58852fdf 100644
--- a/docs/src/pages/components/ClickableTile.svx
+++ b/docs/src/pages/components/ClickableTile.svx
@@ -1,16 +1,44 @@
----
-source: Tile/ClickableTile.svelte
----
-
-### Default
+Clickable tiles create interactive content areas that link to other pages or trigger actions. Use them to group related content and provide clear navigation targets.
-Carbon Design System
+## Default
-### Light variant
+Create a clickable tile with an `href` to link to another page.
-Carbon Design System
+
+Carbon Design System
+
+
+## Prevent default behavior
+
+Handle the `click` event to override the default link behavior. Use `e.preventDefault()` to stop navigation.
+
+ {
+ e.preventDefault();
+ // custom behavior
+ }}
+>
+ Carbon Design System
+
+
+## Light variant
+
+Set `light` to `true` to use the light color scheme.
+
+
+Carbon Design System
+
+
+## Disabled state
+
+Set `disabled` to `true` to prevent interaction.
+
+
+Carbon Design System
+
diff --git a/docs/src/pages/components/CodeSnippet.svx b/docs/src/pages/components/CodeSnippet.svx
index d86f3894..d1e1dc42 100644
--- a/docs/src/pages/components/CodeSnippet.svx
+++ b/docs/src/pages/components/CodeSnippet.svx
@@ -1,5 +1,5 @@
-
+Code snippets display and copy code examples. They support single-line, multi-line, and inline formats with customizable copy and expand functionality.
-### Default (single-line)
+This component uses the native, asynchronous [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText) to copy text.
-yarn add -D carbon-components-svelte
+You can override the default copy functionality with your own implementation. See [Overriding copy functionality](#overriding-copy-functionality).
-### Inline
+## Default
-rm -rf node_modules/
+Display a single-line code snippet by default.
-### Multi-line
+
+
+## Overriding copy functionality
+
+Pass a custom function to the `copy` prop to override the default copy behavior.
+
+In this example, we use the open source module [clipboard-copy](https://github.com/feross/clipboard-copy) to copy the text instead of the default Clipboard API.
+
+
+
+## Preventing copy functionality
+
+Pass a no-op function to the `copy` prop to disable copying.
+
+ {}} />
+
+## Inline
+
+Set `type="inline"` to display code inline with text.
+
+
+
+## Multi-line
+
+Set `type="multi"` to display multiple lines of code with expand/collapse functionality.
-### Hidden copy button
+## Expanded by default
+
+Set `expanded` to `true` to show the full multi-line code snippet.
+
+
+
+## Reactive example
+
+The multi-line code snippet dispatches "expand" and "collapse" events.
+
+
+
+## Custom copy feedback text
+
+Set `feedback` to customize the copy button feedback text.
+
+
+
+## Hidden copy button
+
+Set `hideCopyButton` to `true` to hide the copy button.
-### Wrapped text
+## Hidden show more button
-`wrapText` only applies to the `"multi"` type.
+Set `showMoreLess` to `false` to hide the expand/collapse button on multi-line snippets.
+
+
+
+## Hidden copy, show more buttons
+
+Hide both the copy and expand/collapse buttons.
+
+
+
+## Custom show more/less text
+
+Set `showMoreText` and `showLessText` to customize the expand/collapse button text.
+
+
+
+## Disabled
+
+Set `disabled` to `true` to disable interaction. This only applies to `"single"` and `"multi"` types.
+
+
+
+
+
+## Wrapped text
+
+By default, the code snippet preserves text formatting and does not wrap text.
+
+Set `wrapText` to `true` to wrap long lines in multi-line snippets.
-### Dynamic multi-line code
+## Dynamic multi-line code
-For dynamically updated code, you must use the `code` prop instead of the default slot.
+Use the `code` prop instead of the default slot for dynamically updated code.
-### Hidden multi-line code
+## Hidden multi-line code
-There may be cases where your code snippet is hidden in the DOM. The logic to render the "Show more" button relies on the element's computed height. For hidden content, the button will not appear because the computed height is `0`.
+The "Show more" button relies on the element's computed height. For hidden content, the button won't appear because the height is `0`.
-The recommended workaround is to re-render the component. See the example below.
+Re-render the component to fix this issue.
-### Skeleton
+## Skeleton
-The default skeleton type is `"single"`.
+Set `skeleton` to `true` to show a loading state. Defaults to `"single"` type.
-### Skeleton (multi-line)
+## Skeleton (multi-line)
+
+Set `type="multi"` with `skeleton` to show a multi-line loading state.
\ No newline at end of file
diff --git a/docs/src/pages/components/ComboBox.svx b/docs/src/pages/components/ComboBox.svx
index e8c689f9..6cce91f4 100644
--- a/docs/src/pages/components/ComboBox.svx
+++ b/docs/src/pages/components/ComboBox.svx
@@ -1,9 +1,19 @@
-### Default
+`ComboBox` combines a text input with a dropdown menu to let users select from predefined options or enter custom values. It supports filtering, custom item rendering, and various states.
+
+`ComboBox` is keyed for performance reasons.
+
+
+
Every items object must have a unique "id" property.
+
+
+## Default
+
+Create a combobox with a title and placeholder text. Each item requires a unique `id` and `text`.
-### Selected index
+## Custom slot
-
+
+## Hidden label
+
+Set `hideLabel` to `true` to visually hide the label while keeping it accessible to screen readers.
+
+
-### Filterable
+## Initial selected id
+
+Set `selectedId` to pre-select an item when the combobox loads.
+
+
+
+## Reactive example
+
+See how the combobox responds to user input and selection changes.
+
+
+
+## Clear selection
+
+Use `bind:this` to access the component instance and call `ComboBox.clear()` to programmatically clear the selection.
+
+Set `focus: false` in the method options to prevent re-focusing the input.
+
+
+
+## Multiple combo boxes
+
+See how to manage multiple comboboxes in a form.
+
+
+
+## Filterable
+
+Enable filtering to let users search through the options.
-### Light variant
+## Filterable with custom label
+
+Set `itemToString` to customize how items display in the filterable combobox.
+
+
+
+## Top direction
+
+Set `direction` to `"top"` to make the dropdown menu appear above the input.
+
+
+
+## Light variant
+
+Set `light` to `true` to use the light color scheme.
-### Extra-large size
+## Extra-large size
+
+Set `size` to `"xl"` for an extra-large combobox.
-### Small size
+## Small size
+
+Set `size` to `"sm"` for a small combobox.
-### Disabled
+## Invalid state
+
+Set `invalid` to `true` and provide `invalidText` to show an error message.
+
+
+
+## Warning state
+
+Set `warn` to `true` and provide `warnText` to show a warning message.
+
+
+
+## Disabled state
+
+Set `disabled` to `true` to prevent interaction with the combobox.
\ No newline at end of file
+ ]} />
+
+## Disabled items
+
+Set `disabled: true` in an item object to disable specific options.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/ComposedModal.svx b/docs/src/pages/components/ComposedModal.svx
index ed19c196..6fe96ac2 100644
--- a/docs/src/pages/components/ComposedModal.svx
+++ b/docs/src/pages/components/ComposedModal.svx
@@ -1,11 +1,21 @@
---
-components: ["ComposedModal", "ModalHeader", "ModalBody", "ModalFooter", "Checkbox"]
+components: ["ComposedModal", "ModalHeader", "ModalBody", "ModalFooter"]
---
-### Composed modal
+`ComposedModal` lets you build custom modals by combining `ModalHeader`, `ModalBody`, and `ModalFooter` components. Use it to create focused interactions that require user attention or input.
+
+## Composed modal
+
+Create a modal with a header, body, and footer. Each section can be customized independently.
+
+## Multiple secondary buttons
+
+Set `secondaryButtons` in `ModalFooter` to create a 3-button modal. This prop replaces `secondaryButtonText` and takes a tuple of two button configurations.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/ContentSwitcher.svx b/docs/src/pages/components/ContentSwitcher.svx
index 3dc212f8..73d10640 100644
--- a/docs/src/pages/components/ContentSwitcher.svx
+++ b/docs/src/pages/components/ContentSwitcher.svx
@@ -4,19 +4,25 @@ components: ["ContentSwitcher", "Switch"]
-### Default
+`ContentSwitcher` lets users switch between different views or sections of content. Use it to organize related content into distinct categories or states.
+
+## Default
+
+Create a content switcher with `Switch` components. Each switch needs a `text` prop.
-### Initial selected index
+## Initial selected index
+
+Set `selectedIndex` to pre-select a switch when the content switcher loads.
@@ -24,43 +30,52 @@ components: ["ContentSwitcher", "Switch"]
-### Light variant
+## Reactive example
-
-
-
-
+This example demonstrates how to programmatically control the content switcher using
+the `bind:selectedIndex` directive. Update the selected index based on user
+interactions or application state.
-### Custom switch slot
+
+
+## Custom switch slot
+
+Override the default slot in `Switch` to customize how each option displays.
- Latest news
+ Latest news
- Trending
+ Trending
-### Extra-large size
+## Extra-large size
+
+Set `size` to `"xl"` for an extra-large content switcher.
-### Small size
+## Small size
+
+Set `size` to `"sm"` for a small content switcher.
-### Disabled
+## Disabled
+
+Set `disabled` to `true` on individual switches to prevent interaction.
diff --git a/docs/src/pages/components/ContextMenu.svx b/docs/src/pages/components/ContextMenu.svx
new file mode 100644
index 00000000..3ef81928
--- /dev/null
+++ b/docs/src/pages/components/ContextMenu.svx
@@ -0,0 +1,37 @@
+---
+components: ["ContextMenu", "ContextMenuGroup", "ContextMenuRadioGroup", "ContextMenuOption", "ContextMenuDivider"]
+---
+
+
+
+`ContextMenu` displays a menu when users right-click. Use it to provide quick access to contextual actions or options.
+
+In the examples, right click anywhere within the iframe.
+
+## Default
+
+The context menu appears when right-clicking anywhere in the window. Use `ContextMenuOption` for menu items and `ContextMenuDivider` for visual separation.
+
+
+
+## Custom target
+
+By default, the context menu will trigger when right clicking anywhere in the `window`.
+
+Set `target` to specify which element triggers the context menu.
+
+
+
+## Multiple targets
+
+Set `target` to an array of elements to trigger the context menu from multiple sources.
+
+
+
+## Radio groups
+
+Use `ContextMenuGroup` and `ContextMenuRadioGroup` to organize related options and create radio button selections.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/CopyButton.svx b/docs/src/pages/components/CopyButton.svx
index b48be93a..88eaed24 100644
--- a/docs/src/pages/components/CopyButton.svx
+++ b/docs/src/pages/components/CopyButton.svx
@@ -1,14 +1,34 @@
-
+`CopyButton` lets users copy text to their clipboard with a single click. Use it to provide quick access to code snippets, links, or other text content.
-### Default
+This component uses the native [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText) to copy text. Override the default copy functionality with your own implementation. See [Overriding copy functionality](#overriding-copy-functionality).
-
+## Default
-### Custom feedback
+Create a copy button with the `text` prop to specify what to copy.
-
\ No newline at end of file
+
+
+## Custom feedback text
+
+Set `feedback` to customize the message shown after copying.
+
+
+
+## Overriding copy functionality
+
+Pass a custom function to the `copy` prop to override the default copy behavior.
+
+This example uses the NPM package [clipboard-copy](https://github.com/feross/clipboard-copy) to copy the text instead of the default Clipboard API.
+
+
+
+## Preventing copy functionality
+
+Pass a no-op function to the `copy` prop to disable copying.
+
+ {}} />
diff --git a/docs/src/pages/components/DataTable.svx b/docs/src/pages/components/DataTable.svx
index eab2ee80..c3eb1c59 100644
--- a/docs/src/pages/components/DataTable.svx
+++ b/docs/src/pages/components/DataTable.svx
@@ -1,14 +1,27 @@
---
-components: ["DataTable", "Toolbar", "ToolbarContent", "ToolbarSearch", "ToolbarMenu", "ToolbarMenuItem", "ToolbarBatchActions"]
+components: ["DataTable", "Pagination","Toolbar", "ToolbarContent", "ToolbarSearch", "ToolbarMenu", "ToolbarMenuItem", "ToolbarBatchActions"]
---
-### Default
+`DataTable` displays structured data in a tabular format. Use it to present large datasets with features like sorting, filtering, pagination, and row selection.
+
+
+
+ This component is keyed for performance.
+
+ Every headers object must have a unique "key" property.
+
Every rows object must have a unique "id" property.
+
+
+
+## Default
+
+Create a basic table by providing `headers` and `rows` data. Match the `key` in headers with the corresponding property in rows.
-### Slotted cells
+## Slotted cells
-Use the `"cell"` slot to control the display value per table cell. Individual row and cell data are provided through the `let:row` and `let:cell` directives.
-
-The slot name for the table header cells is `"cell-header"`.
+Use the `"cell"` slot to customize cell content. Access row and cell data through `let:row` and `let:cell` directives. Use `"cell-header"` slot for header cells.
-
+
{#if header.key === 'port'}
{header.value} (network)
{:else}
{header.value}
{/if}
-
-
+
+
{#if cell.key === 'rule' && cell.value === 'Round robin'}
- {cell.value}
+ {cell.value}
{:else}
{cell.value}
{/if}
-
+
-### With title, description
+## With title, description
+
+Add a title and description to provide context for the table data.
-### With custom display and sort methods
+## Slottable title, description
- cost + " €" },
- {
- key: "expireDate",
- value: "Expire date",
- display: (date) => new Date(date).toLocaleString(),
- sort: (a, b) => (new Date(a) <= new Date(b) ? -1 : 1),
- },
+ { key: "rule", value: "Rule" }
]}"
rows="{[
{
@@ -213,53 +222,143 @@ The slot name for the table header cells is `"cell-header"`.
name: "Load Balancer 3",
protocol: "HTTP",
port: 3000,
- cost: 100,
- expireDate: "2020-10-21",
+ rule: "Round robin"
},
{
id: "b",
name: "Load Balancer 1",
protocol: "HTTP",
port: 443,
- cost: 200,
- expireDate: "2020-09-10",
+ rule: "Round robin"
},
{
id: "c",
name: "Load Balancer 2",
protocol: "HTTP",
port: 80,
- cost: 150,
- expireDate: "2020-11-24",
+ rule: "DNS delegation"
},
{
id: "d",
name: "Load Balancer 6",
protocol: "HTTP",
port: 3000,
- cost: 250,
- expireDate: "2020-12-01",
+ rule: "Round robin"
},
{
id: "e",
name: "Load Balancer 4",
protocol: "HTTP",
port: 443,
- cost: 550,
- expireDate: "2021-03-21",
+ rule: "Round robin"
},
{
id: "f",
name: "Load Balancer 5",
protocol: "HTTP",
port: 80,
- cost: 400,
- expireDate: "2020-11-14",
+ rule: "DNS delegation"
+ },
+ ]}"
+>
+ Load balancers
+
+ Your organization's active load balancers.
+
+
+
+## Static width
+
+Set `useStaticWidth` to `true` to render the table with an auto width instead of 100%.
+
+
-### With toolbar
+## Custom column widths
+
+Specify `width` or `minWidth` in the `headers` object to set column dimensions. This applies a fixed table layout.
+
+
+
Custom column widths do not work with a sticky header.
+
+
+
+
+## Sticky header
+
+Set `stickyHeader` to `true` to fix the header in place. This adds a maximum height to force scrolling.
+
+ ({
+ id: i,
+ name: "Load Balancer " + (i + 1),
+ protocol: "HTTP",
+ port: i % 3 ? (i % 2 ? 3000 : 80) : 443,
+ rule: i % 3 ? "Round robin" : "DNS delegation",
+ }))}
+/>
+
+## With toolbar
+
+Add a toolbar with search, menu, and actions above the table.
Restart all
- API documentation
- Stop all
+
+ API documentation
+
+ Stop all
-### With toolbar (small size)
+## With toolbar (small size)
+
+Use `size="short"` to create a more compact table with a small toolbar.
Restart allAPI documentation
- Stop all
+ Stop all
-### Zebra stripes
+## Filterable
+
+Set `shouldFilterRows` to `true` to enable client-side filtering. The default filter performs string comparisons on cell values.
+
+For pagination with filtering, bind to `filteredRowIds` and pass its length to `Pagination`'s `totalItems`.
+
+
+
+## Filterable (custom)
+
+Pass a function to `shouldFilterRows` to implement custom filtering logic.
+
+
+
+## Zebra stripes
+
+Set `zebra` to `true` to add alternating row colors.
-### Tall rows
+## Tall rows
+
+Set `size="tall"` for increased row height.
-### Short rows
+## Medium rows
+
+Set `size="medium"` for standard row height.
+
+
+
+## Short rows
+
+Set `size="short"` for compact row height.
-### Compact rows
+## Compact rows
+
+Set `size="compact"` for minimal row height.
-### Sortable
+## Sortable
+
+Set `sortable` to `true` to enable column sorting. Disable sorting on specific columns by setting `sort: false` in the header object.
-### Empty column with overflow menu
+## Sortable with pagination
-Some use cases require an empty column in the table body without a corresponding table header.
+Bind to `pageSize` and `page` props of `Pagination` and pass them to `DataTable`.
-For an object in the `headers` array, set `empty` to `true` to render an empty column.
+
-In the following example, each row in the sortable data table has an overflow menu. There isn't a separate, useless table header column for the overflow menu.
+## Sortable with custom display and sort methods
+
+Use `display` and `sort` functions in header objects to customize cell rendering and sorting.
+
+ cost + " €" },
+ {
+ key: "expireDate",
+ value: "Expire date",
+ display: (date) => new Date(date).toLocaleString(),
+ sort: (a, b) => new Date(a) - new Date(b),
+ },
+ ]}"
+ rows="{[
+ {
+ id: "a",
+ name: "Load Balancer 3",
+ protocol: "HTTP",
+ port: 3000,
+ cost: 100,
+ expireDate: "2020-10-21",
+ },
+ {
+ id: "b",
+ name: "Load Balancer 1",
+ protocol: "HTTP",
+ port: 443,
+ cost: 200,
+ expireDate: "2020-09-10",
+ },
+ {
+ id: "c",
+ name: "Load Balancer 2",
+ protocol: "HTTP",
+ port: 80,
+ cost: 150,
+ expireDate: "2020-11-24",
+ },
+ {
+ id: "d",
+ name: "Load Balancer 6",
+ protocol: "HTTP",
+ port: 3000,
+ cost: 250,
+ expireDate: "2020-12-01",
+ },
+ {
+ id: "e",
+ name: "Load Balancer 4",
+ protocol: "HTTP",
+ port: 443,
+ cost: 550,
+ expireDate: "2021-03-21",
+ },
+ {
+ id: "f",
+ name: "Load Balancer 5",
+ protocol: "HTTP",
+ port: 80,
+ cost: 400,
+ expireDate: "2020-11-14",
+ },
+ ]}"
+/>
+
+## Sortable with nested object values
+
+Access nested object properties using dot notation in the header key.
+
+ cost + " €" },
+ {
+ key: "expireDate",
+ value: "Expire date",
+ display: (date) => new Date(date).toLocaleString(),
+ sort: (a, b) => new Date(a) - new Date(b),
+ },
+ ]}"
+ rows="{[
+ {
+ id: "a",
+ name: "Load Balancer 3",
+ network: {
+ protocol: "HTTP",
+ port: 3000,
+ },
+ cost: 100,
+ expireDate: "2020-10-21",
+ },
+ {
+ id: "b",
+ name: "Load Balancer 1",
+ network: {
+ protocol: "HTTP",
+ port: 443,
+ },
+ cost: 200,
+ expireDate: "2020-09-10",
+ },
+ {
+ id: "c",
+ name: "Load Balancer 2",
+ network: {
+ protocol: "HTTP",
+ port: 80,
+ },
+ cost: 150,
+ expireDate: "2020-11-24",
+ },
+ {
+ id: "d",
+ name: "Load Balancer 6",
+ network: {
+ protocol: "HTTP",
+ port: 3000,
+ },
+ cost: 250,
+ expireDate: "2020-12-01",
+ },
+ {
+ id: "e",
+ name: "Load Balancer 4",
+ network: {
+ protocol: "HTTP",
+ port: 443,
+ },
+ cost: 550,
+ expireDate: "2021-03-21",
+ },
+ {
+ id: "f",
+ name: "Load Balancer 5",
+ network: {
+ protocol: "HTTP",
+ port: 80,
+ },
+ cost: 400,
+ expireDate: "2020-11-14",
+ },
+ ]}"
+/>
+
+## Programmatic sorting
+
+Use `sortKey` and `sortDirection` props to control sorting programmatically. Set `sortKey` to a valid header key and `sortDirection` to "none", "ascending", or "descending".
+
+
+
+## Empty column with overflow menu
+
+Set `empty: true` in a header object to create an empty column. Use this for overflow menus without a header.
-### Selectable
+## Selectable rows (checkbox)
+
+Set `selectable` to `true` for multi-select functionality. Bind to `selectedRowIds` to track selections. Use `inputName` to customize checkbox names.
-### Initial selected rows
+## Batch selection
+
+Set `batchSelection` to `true` to add a checkbox for selecting all rows. The checkbox shows an indeterminate state when some rows are selected.
-### Selectable with batch actions
+## Batch selection with initial selected rows
+
+Use `selectedRowIds` to specify initially selected rows.
+
+
+
+## Batch selection with batch actions toolbar
+
+Add a toolbar for batch actions when rows are selected.
-### Selectable (radio)
+## Batch selection with controlled toolbar
+
+Control the batch actions toolbar with the `active` prop. Prevent default cancel behavior in the `on:cancel` event.
+
+
+
+## Selectable rows (radio)
+
+Set `radio` to `true` for single-row selection. Bind to `selectedRowIds` to track the selected row. Use `inputName` to customize radio button names.
-### Expandable
+## Non-selectable rows
+
+Use `nonSelectableRowIds` to prevent selection of specific rows.
+
+
+
+## Expandable rows
+
+Set `expandable` to `true` to make rows expandable. Use the `expanded-row` slot to customize expanded content.
-
-
- {JSON.stringify(row, null, 2)}
-
-
+
+
{JSON.stringify(row, null, 2)}
+
-### Batch expansion
+## Non-expandable rows
+
+Use `nonExpandableRowIds` to prevent expansion of specific rows.
+
+
+
+## Expandable (zebra styles)
+
+Combine expandable rows with zebra striping.
+
+
+
+## Expandable (compact size)
+
+Set `size="compact"` for expandable rows with minimal height.
+
+
+
+
{JSON.stringify(row, null, 2)}
+
+
+
+## Expandable (short size)
+
+Set `size="short"` for expandable rows with compact height.
+
+
+
+
{JSON.stringify(row, null, 2)}
+
+
+
+## Expandable (tall size)
+
+Set `size="tall"` for expandable rows with increased height.
+
+
+
+
{JSON.stringify(row, null, 2)}
+
+
+
+## Batch expansion
+
+Set `batchExpansion` to `true` to expand and collapse all rows at once.
-
-
- {JSON.stringify(row, null, 2)}
-
-
+
+
{JSON.stringify(row, null, 2)}
+
-### Skeleton
+## Expandable and selectable rows
+
+Combine `batchExpansion` and `batchSelection` for tables with both expandable and selectable rows.
+
+
+
+## Skeleton
+
+Use `DataTableSkeleton` to show a loading state.
-### Skeleton with headers, row count
+## Skeleton with headers, row count
+
+Specify headers and row count for the skeleton.
-### Skeleton without header, toolbar
+## Skeleton with object headers
+
+Pass header objects to customize the skeleton.
+
+
+
+## Skeleton with empty header
+
+Add an empty header column with `empty: true`.
+
+
+
+## Skeleton without header, toolbar
+
+Hide the header and toolbar in the skeleton.
-### Skeleton (tall size)
+## Skeleton (tall size)
+
+Set `size="tall"` for a taller skeleton.
-### Skeleton (short size)
+## Skeleton (short size)
+
+Set `size="short"` for a shorter skeleton.
-### Skeleton (compact size)
+## Skeleton (compact size)
-
+Set `size="compact"` for a minimal skeleton.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/DatePicker.svx b/docs/src/pages/components/DatePicker.svx
index 5971be61..c7cb9f3f 100644
--- a/docs/src/pages/components/DatePicker.svx
+++ b/docs/src/pages/components/DatePicker.svx
@@ -3,58 +3,112 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
---
-### Default (simple)
+`DatePicker` lets users select a date or date range using a calendar interface. It uses the [flatpickr](https://github.com/flatpickr/flatpickr) library for its calendar implementation.
+
+
+
+ If using Rollup, specify inlineDynamicImports: true in your rollup.config.js.
+
+
+
+## Single
+
+Set `datePickerType` to `"single"` for single date selection.
+
+
+
+## Range
+
+Set `datePickerType` to `"range"` to enable date range selection.
+
+
+
+## DatePicker in a modal
+
+The calendar is positioned inside the wrapper by default (`flatpickrProps.static: true`). This ensures proper positioning within a [Modal](/components/Modal).
+
+Set `flatpickrProps.static` to `false` to position the calendar outside the wrapper.
+
+
+
+## Simple
+
+Create a simple date picker without a dropdown calendar.
-### Hidden label
+## With helper text
+
+Add helper text to provide additional context or formatting instructions.
+
+
+
+
+
+## Hidden label
+
+Hide the label while maintaining accessibility.
-### Light variant
+## Light variant
+
+Use the light variant for light backgrounds.
-### Extra-large size
+## Extra-large size
+
+Use the extra-large size for more prominent date pickers.
-### Small size
+## Small size
+
+Use the small size for compact date pickers.
-### Invalid state
+## Invalid state
+
+Show an invalid state when the input value is not valid.
-### Disabled state
+## Warning state
+
+Show a warning state to indicate potential issues with the input.
+
+
+
+
+
+## Disabled state
+
+Disable the date picker to prevent user interaction.
-### Single
+## Skeleton
-
-
-
+Show a loading state with the skeleton component.
-### Skeleton
-
-
\ No newline at end of file
+
diff --git a/docs/src/pages/components/Dropdown.svx b/docs/src/pages/components/Dropdown.svx
index 31c7d45f..afd5cee2 100644
--- a/docs/src/pages/components/Dropdown.svx
+++ b/docs/src/pages/components/Dropdown.svx
@@ -3,56 +3,152 @@ components: ["Dropdown", "DropdownSkeleton"]
---
-### Default
+The `Dropdown` component provides a select input with a dropdown menu. It supports
+various states, sizes, and customization options. Each item in the dropdown must
+have a unique `id` property for proper functionality.
-
+
Every items object must have a unique "id" property.
+
+
+## Default
+
+Use the `Dropdown` component to create a select input with a dropdown menu. Each item
+must have a unique `id` property.
+
+
-### Format item display text
+## Custom slot
-Use the `itemToString` prop to format the display of individual items.
+Override the default slot to customize the display of each item. Access the item and
+index through the `let:` directive.
+
+
+
+## Hidden label
+
+Hide the label while maintaining accessibility by setting the `hideLabel` prop to
+`true`. The label will still be available to screen readers.
+
+
+
+## Format item display text
+
+Format the display text of items using the `itemToString` prop. This function
+receives the item object and returns the formatted string.
{
return item.text + ' (' + item.id +')'
-}} titleText="Contact" selectedIndex={0} items="{[{id: "0", text: "Slack"},
+}} titleText="Contact" selectedId="0" items="{[{id: "0", text: "Slack"},
{id: "1", text: "Email"},
{id: "2", text: "Fax"}]}" />
-### Light variant
+## Multiple dropdowns
-
+
+## Top direction
+
+Display the dropdown menu above the input by setting the `direction` prop to
+`"top"`. This is useful when there's limited space below the input.
+
+
-### Inline type
+## Light variant
-
-### Extra-large size
+## Inline variant
-
-### Small size
+## Extra-large size
-
-### Disabled state
+## Small size
-
-### Skeleton
+## Invalid state
+
+Indicate an invalid selection by setting the `invalid` prop to `true`. Provide
+feedback to users with the `invalidText` prop.
+
+
+
+## Warning state
+
+Indicate a warning state by setting the `warn` prop to `true`. Provide additional
+context with the `warnText` prop.
+
+
+
+## Disabled state
+
+Disable the entire dropdown by setting the `disabled` prop to `true`. This prevents
+user interaction with the component.
+
+
+
+## Disabled items
+
+Disable specific items in the dropdown by setting the `disabled` property to
+`true` in the item object. This allows for more granular control over available
+selections.
+
+
+
+## Skeleton
+
+Display a loading state using the `DropdownSkeleton` component. This provides
+visual feedback while the dropdown content is being loaded.
\ No newline at end of file
diff --git a/docs/src/pages/components/ExpandableTile.svx b/docs/src/pages/components/ExpandableTile.svx
index 53da6317..398d64ee 100644
--- a/docs/src/pages/components/ExpandableTile.svx
+++ b/docs/src/pages/components/ExpandableTile.svx
@@ -1,29 +1,94 @@
----
-source: Tile/ExpandableTile.svelte
----
-
-### Default (unexpanded)
+The `ExpandableTile` component creates a collapsible content container that can
+show and hide content with a smooth animation. It's ideal for managing content
+overflow and progressive disclosure of information. The component automatically
+measures content height using a resize observer.
+
+## Default
+
+Create an expandable tile that shows and hides content. The component uses a
+[resize observer](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
+to determine the height of the above-the-fold content.
+
+By default, the tile is collapsed. Use the `above` and `below` slots to define the
+content that appears before and after expansion.
+
+
+
+
+ Above the fold content here
+
+
+
+
+ More above the fold content
+
+
+
Below the fold content here
+
+
+## Custom tile heights
+
+Set custom heights for the tile content using CSS. This is useful when you need to
+control the exact dimensions of the visible and hidden content.
Above the fold content here
Below the fold content here
-### Expanded
+## Expanded
+
+Display the tile in its expanded state by default by setting the `expanded` prop to
+`true`.
-
Above the fold content here
-
Below the fold content here
+
Above the fold content here
+
Below the fold content here
-### Light variant
+## Light variant
+
+Use the light variant for expandable tiles on dark backgrounds by setting the
+`light` prop to `true`.
-
Above the fold content here
-
Below the fold content here
-
\ No newline at end of file
+
Above the fold content here
+
Below the fold content here
+
+
+## With icon labels
+
+Customize the expand/collapse button labels using the `tileExpandedLabel` and
+`tileCollapsedLabel` props.
+
+
+
Above the fold content here
+
Below the fold content here
+
+
+## With interactive content
+
+Handle interactive content within the tile by preventing event propagation. This
+ensures that clicks on interactive elements don't trigger the tile's expand/collapse
+behavior.
+
+
+
+
diff --git a/docs/src/pages/components/FileUploader.svx b/docs/src/pages/components/FileUploader.svx
index 32cb1bcf..37e30df5 100644
--- a/docs/src/pages/components/FileUploader.svx
+++ b/docs/src/pages/components/FileUploader.svx
@@ -3,34 +3,142 @@ components: ["FileUploaderButton", "FileUploader", "FileUploaderDropContainer",
---
-### File uploader (button-only)
+The `FileUploader` components provide a complete solution for file uploads, including
+a button trigger, drag-and-drop container, and file list display. The components
+support various states, file validation, and customization options.
-
+## File uploader (button-only)
-### File uploader
+Create a simple file upload button using `FileUploaderButton`. By default, it
+accepts a single file. Set `multiple` to `true` to allow multiple file selection.
+
+
+
+## Multiple files
+
+Enable multiple file selection by setting the `multiple` prop to `true`. This
+allows users to select multiple files at once.
+
+
+
+## Custom button kind, size
+
+Customize the button appearance using the `kind` and `size` props. The default is
+a small primary button.
+
+
+
+
+
+
+## File uploader
+
+The `FileUploader` component combines a button trigger with a list of uploaded
+files. It supports file type restrictions, multiple file selection, and various
+upload states.
+
+This example accepts multiple JPEG files and displays them in a completed state.
-### Item (uploading)
+## Clear files
+
+Remove uploaded files from the `FileUploader` component in two ways:
+
+
+ programmatically using the clearFiles accessor
+ two-way binding by setting files to []
+
+
+
+
+## File uploader (disabled state)
+
+Disable the file uploader by setting the `disabled` prop to `true`. This prevents
+user interaction with the component.
+
+
+
+## Item (uploading)
+
+Display a file upload in progress using the `uploading` status. This shows a
+loading indicator and the file name.
-### Item (complete)
+## Item (complete)
+
+Show a successfully uploaded file using the `complete` status. This displays a
+checkmark icon next to the file name.
-### Item (invalid)
+## Item (edit)
-
+Enable file deletion by setting the status to `"edit"`. Clicking the close icon
+dispatches a `delete` event with the item's ID.
-### Drop container
+ {
+ console.log(e.detail); // "readme"
+}} />
-
+## Item (edit status, invalid state)
-### Skeleton
+Mark a file as invalid while keeping it editable. This shows an error icon and
+allows the user to remove the file.
+
+
+
+## Item (edit status, invalid state with subject, body)
+
+Provide detailed error messages for invalid files using the `errorSubject` and
+`errorBody` props. This helps users understand and resolve upload issues.
+
+
+
+## Item sizes
+
+Customize the size of file uploader items using the `size` prop. The default size
+is "default".
+
+
+
+
+
+## Drop container
+
+Use `FileUploaderDropContainer` for drag-and-drop file uploads. It supports file
+validation and multiple file selection.
+
+This example accepts files smaller than 1 kB and logs the selected files to the
+console.
+
+ {
+ return files.filter(file => file.size < 1_024)
+ }}
+ on:change={e=> {
+ console.log("files", e.detail)
+ }}
+/>
+
+## Skeleton
+
+Display a loading state using the `FileUploaderSkeleton` component. This provides
+visual feedback while the file uploader content is being loaded.
\ No newline at end of file
diff --git a/docs/src/pages/components/FluidForm.svx b/docs/src/pages/components/FluidForm.svx
index 80e84bdc..d05f56d8 100644
--- a/docs/src/pages/components/FluidForm.svx
+++ b/docs/src/pages/components/FluidForm.svx
@@ -1,19 +1,36 @@
-### Fluid form
+The `FluidForm` component provides a fluid-width form layout that adapts to its
+container. It's designed for full-width form layouts and works with most Carbon
+input components. Note that inline input variants cannot be used within a
+`FluidForm`.
+
+## Fluid form
+
+Create a fluid-width form layout using the `FluidForm` component. This example
+shows a basic login form with required fields.
-
+
-
\ No newline at end of file
+
+
+## Invalid state
+
+Handle form validation and display error states using the `invalid` and
+`invalidText` props on form inputs. This example demonstrates how to show
+validation errors in a fluid form.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/Form.svx b/docs/src/pages/components/Form.svx
index 5d66a2dd..a0db291b 100644
--- a/docs/src/pages/components/Form.svx
+++ b/docs/src/pages/components/Form.svx
@@ -14,7 +14,14 @@ components: ["Form", "FormGroup"]
import Preview from "../../components/Preview.svelte";
-### Form
+The `Form` component provides a structured way to collect user input. It works with
+various form controls like checkboxes, radio buttons, and select menus. The
+`FormGroup` component helps organize related form controls with a legend.
+
+## Form
+
+Create a form with grouped controls using `Form` and `FormGroup`. This example
+shows a form with checkboxes, radio buttons, and a select menu.
+
+## Prevent default behavior
+
+Handle form submission by preventing the default browser behavior. Use
+`e.preventDefault()` to stop the native form submission and handle the event
+programmatically.
+
+
diff --git a/docs/src/pages/components/Grid.svx b/docs/src/pages/components/Grid.svx
index 0f28f3d0..741eea4d 100644
--- a/docs/src/pages/components/Grid.svx
+++ b/docs/src/pages/components/Grid.svx
@@ -6,30 +6,62 @@ components: ["Grid", "Row", "Column"]
import Preview from "../../components/Preview.svelte";
-### Default
+The `Grid` system provides a responsive, 12-column layout structure. Use `Row` and
+`Column` components to create flexible layouts that adapt to different screen
+sizes. The grid supports various spacing options and column configurations.
+
+## Default
+
+Create a basic grid layout with equal-width columns. This example demonstrates the
+default grid behavior.
-### Full width
+## Full width
+
+Use the full-width grid variant for layouts that span the entire viewport width.
+This removes the default max-width constraint.
-### Narrow
+## Narrow
+
+Create a more compact grid layout using the narrow variant. This reduces the
+spacing between columns.
-### Condensed
+## Condensed
+
+Use the condensed variant for even tighter spacing between columns. This is ideal
+for dense data displays.
-### Responsive
+## Responsive
+
+Build responsive layouts by specifying different column widths for different
+breakpoints. The grid automatically adjusts based on screen size.
-### Offset columns
+## Offset columns
+
+Create space between columns using the offset feature. This allows for more
+flexible layouts without empty columns.
-### Aspect ratio columns
+## Aspect ratio columns
+
+Maintain consistent column heights using aspect ratio columns. This ensures
+content alignment across different column widths.
+
+## Padded columns
+
+Add padding to columns using the padded variant. This creates more breathing room
+between content.
+
+
diff --git a/docs/src/pages/components/Icon.svx b/docs/src/pages/components/Icon.svx
deleted file mode 100644
index 47f20550..00000000
--- a/docs/src/pages/components/Icon.svx
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-### Default
-
-
-
-
-
-
-### Skeleton
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/src/pages/components/ImageLoader.svx b/docs/src/pages/components/ImageLoader.svx
new file mode 100644
index 00000000..41f79999
--- /dev/null
+++ b/docs/src/pages/components/ImageLoader.svx
@@ -0,0 +1,64 @@
+
+
+The `ImageLoader` component provides a robust way to load images with built-in
+loading and error states. It uses the [Image API](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image)
+to handle image loading programmatically. The component supports aspect ratios,
+fade-in animations, and custom loading/error states.
+
+## Default
+
+Load an image with the default configuration. The component handles the loading
+process automatically.
+
+
+
+## Slots
+
+Customize the loading and error states using named slots. This example shows how
+to display a loading indicator and error message.
+
+
+
+
+
+
+ An error occurred.
+
+
+
+## With aspect ratio
+
+Maintain consistent image dimensions using aspect ratios. The component uses
+[AspectRatio](/components/AspectRatio) to constrain the image.
+
+Supported aspect ratios include `"2x1"`, `"2x3"`, `"16x9"`, `"4x3"`, `"1x1"`,
+`"3x4"`, `"3x2"`, `"9x16"` and `"1x2"`.
+
+
+
+## Fade in
+
+Enable a smooth fade-in animation when the image loads successfully. This provides
+a better user experience for image loading.
+
+
+{#key key}{/key}
+
+## Programmatic usage
+
+Control image loading programmatically using component references. This example
+demonstrates how to trigger image loading manually.
+
+
+
+## Dynamic image source
+
+Update the image source dynamically using the same `ImageLoader` instance. This
+allows for smooth transitions between different images.
+
+
diff --git a/docs/src/pages/components/InlineLoading.svx b/docs/src/pages/components/InlineLoading.svx
index d4066455..be82a72c 100644
--- a/docs/src/pages/components/InlineLoading.svx
+++ b/docs/src/pages/components/InlineLoading.svx
@@ -1,23 +1,44 @@
+---
+components: ["InlineLoading"]
+---
+
-### Default
+The `InlineLoading` component provides a compact loading indicator that can be embedded within content. It's ideal for showing progress during inline operations like form submissions or data updates.
+
+## Default
+
+Display a basic loading indicator with the default configuration.
-### With description
+## With description
+
+Add a descriptive text to provide context about the loading operation.
-### Status states
+## Status states
+
+The component supports different status states to indicate progress:
+
+
+ active: Shows an animated loading indicator
+ inactive: Displays a static state
+ finished: Shows a success state
+ error: Displays an error state
+
-### UX example
+## UX example
+
+See how to integrate the loading indicator in a real-world scenario.
\ No newline at end of file
diff --git a/docs/src/pages/components/InlineNotification.svx b/docs/src/pages/components/InlineNotification.svx
index 400a9fc5..73cc37f7 100644
--- a/docs/src/pages/components/InlineNotification.svx
+++ b/docs/src/pages/components/InlineNotification.svx
@@ -1,5 +1,5 @@
---
-source: Notification/InlineNotification.svelte
+components: ["InlineNotification", "NotificationActionButton"]
---
-### Default (error)
+The `InlineNotification` component displays contextual messages inline with content. It supports various types of notifications (error, warning, success, info) and can include actions. Use it to provide feedback or important information to users.
-
+See [detailed usage](https://carbondesignsystem.com/components/notification/usage).
+See also: [ToastNotification](ToastNotification)
-### Hidden close button
+## Default
-
+Display a basic error notification with title and subtitle by default.
-### With actions
+
-
-
- Learn more
-
+## Prevent default close behavior
+
+The component is controlled, allowing you to prevent the default close behavior using `e.preventDefault()`.
+
+ {
+ e.preventDefault();
+ // custom close logic (e.g., transitions)
+}} />
+
+## Slottable title and subtitle
+
+Customize the notification content using slots for more flexibility.
+
+
+ Error:
+ An internal server error occurred.
-### Notification variants
+## Accessible icon descriptions
-
-
-
-
-
-
+Make notifications more accessible by providing custom descriptions for icons.
-### Low contrast
+
-
-
-
-
-
-
+## Hidden close button
+
+Create a persistent notification by hiding the close button.
+
+
+
+## With actions
+
+Add interactive elements to notifications using the actions slot.
+
+
+
+ Learn more
+
+
+
+## Notification variants
+
+The component supports different notification types:
+
+
+
+
+
+
+
+
+## Low contrast
+
+Use low contrast variants for less prominent notifications.
+
+
+
+
+
+
+
diff --git a/docs/src/pages/components/Link.svx b/docs/src/pages/components/Link.svx
index 8d25d605..78c21956 100644
--- a/docs/src/pages/components/Link.svx
+++ b/docs/src/pages/components/Link.svx
@@ -1,41 +1,89 @@
+---
+components: ["Link", "OutboundLink"]
+---
+
-### Default
+The `Link` component provides styled hyperlinks with various customization options. It supports different sizes, states, and can include icons. The `OutboundLink` variant automatically handles external links with proper security attributes.
-Carbon Design System
+## Default
-### Target _blank
+Create a basic link with the default styling.
-Setting `target` to `"_blank"` opens the link in a new tab.
+
+ Carbon Design System
+
-If `target="_blank"`, the `Link` component will automatically set `rel="noopener noreferrer"` to guard against [potential cross-origin security exploits](https://web.dev/external-anchors-use-rel-noopener/).
+## Target _blank
-You can override the `rel` attribute with a custom value.
+For external links, the component automatically adds security attributes. You can override the `rel` attribute if needed.
-Carbon Design System
+
+ Carbon Design System
+
-### Inline variant
+## Outbound link
+
+Use `OutboundLink` as a convenient alternative for external links.
+
+
+ Carbon Design System
+
+
+## Inline variant
+
+Create links that flow naturally with surrounding text.
Visit the
- Carbon Design System.
+
+ Carbon Design System
+ .
-### Large size
+## Link with icon
-Carbon Design System
+Add icons to links for better visual context. Note that `inline` must be `false` when using icons.
-### Small size
+
+ Visit the
+
+ Carbon Design System
+ .
+
-Carbon Design System
+## Size variants
-### Disabled
+The component supports different sizes to match your design needs:
-Carbon Design System
+
+ Large link
+
+
+
+ Default link
+
+
+
+ Small link
+
-### Visited styles
+## Disabled state
-Carbon Design System
\ No newline at end of file
+Disabled links render as plain text while maintaining accessibility.
+
+
+ Disabled link
+
+
+## Visited styles
+
+Show visited state styling for links.
+
+
+ Visited link
+
\ No newline at end of file
diff --git a/docs/src/pages/components/Loading.svx b/docs/src/pages/components/Loading.svx
index 7a1870b1..c064043f 100644
--- a/docs/src/pages/components/Loading.svx
+++ b/docs/src/pages/components/Loading.svx
@@ -1,16 +1,28 @@
+---
+components: ["Loading"]
+---
+
-### Default (with overlay)
+The `Loading` component provides a full-screen or inline loading indicator. It's ideal for showing progress during page loads or data fetching operations.
+
+## Default
+
+Display a loading indicator with a semi-transparent overlay that covers the entire viewport.
-### No overlay
+## No overlay
+
+Show a loading indicator without the overlay, allowing interaction with the underlying content.
-### Small size
+## Small size
+
+Display a more compact loading indicator.
\ No newline at end of file
diff --git a/docs/src/pages/components/LocalStorage.svx b/docs/src/pages/components/LocalStorage.svx
new file mode 100644
index 00000000..c8c0077c
--- /dev/null
+++ b/docs/src/pages/components/LocalStorage.svx
@@ -0,0 +1,26 @@
+---
+components: ["LocalStorage"]
+---
+
+
+
+The `LocalStorage` component provides a reactive wrapper around the [Window.localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). It's useful for persisting user preferences and application state across page reloads.
+
+## Reactive example
+
+See how the component maintains state across page reloads. Toggle the switch and refresh the page to see the persisted state.
+
+
+
+## Clear item, clear all
+
+The component provides methods to manage stored data:
+
+- `clearItem`: Remove a specific key-value pair
+- `clearAll`: Remove all stored data
+
+Use `bind:this` to access these methods. In this example, try toggling the switch, refreshing the page, then clearing the storage.
+
+
\ No newline at end of file
diff --git a/docs/src/pages/components/Modal.svx b/docs/src/pages/components/Modal.svx
index 6592e74d..e11c82ad 100644
--- a/docs/src/pages/components/Modal.svx
+++ b/docs/src/pages/components/Modal.svx
@@ -2,33 +2,78 @@
import Preview from "../../components/Preview.svelte";
-### Default (transactional)
+The `Modal` component provides a focused dialog for user interactions, confirmations, or data entry. It supports various sizes, states, and customization options to create accessible and user-friendly modal experiences.
+
+## Default
+
+Display a modal dialog with a header, content area, and footer by default.
+
+Create a basic modal dialog with primary and secondary actions. This variant is ideal for confirming user actions or gathering input.
-### Danger modal
+## Custom focus
+
+Control which element receives focus when the modal opens. Use `selectorPrimaryFocus` to specify the target element using CSS selectors.
+
+
+
+## Danger modal
+
+Display critical actions or destructive operations with the danger variant. This style emphasizes the severity of the action.
-### Passive modal
+## Passive modal
+
+Create a non-interactive modal for displaying information. This variant lacks action buttons and focuses on content presentation.
-### Extra-small size
+## Has scrolling content
+
+Enable vertical scrolling for modals with lengthy content. This ensures all content remains accessible while maintaining a reasonable modal height.
+
+
+
+## Multiple modals
+
+Stack multiple modals for complex workflows. Each modal maintains its own state and focus management.
+
+
+
+## Multiple secondary buttons
+
+Add up to two secondary actions using the `secondaryButtons` prop. This provides more flexibility than the single `secondaryButtonText` option.
+
+
+
+## Extra-small size
+
+Use the extra-small size for compact notifications by setting `size` to `"xs"`. This is ideal for simple confirmations.
-### Small size
+## Small size
+
+Use the small size for simple confirmations by setting `size` to `"sm"`. This provides a more focused dialog.
-### Large size
+## Large size
+
+Use the large size for complex content by setting `size` to `"lg"`. This provides more space for detailed information.
-### Prevent close on outside click
+## Prevent close on outside click
-`preventCloseOnClickOutside` prevents the modal from being closed when clicking outside of an open modal. This prop is intended to be used for transactional modals.
+Disable closing the modal when clicking outside by setting `preventCloseOnClickOutside` to `true`. This is useful for transactional modals where explicit user action is required.
+## Button with icon
+
+Enhance modal buttons with icons for better visual context and clarity. This example shows how to add icons to modal actions.
+
+
diff --git a/docs/src/pages/components/MultiSelect.svx b/docs/src/pages/components/MultiSelect.svx
index 85a429c7..64769648 100644
--- a/docs/src/pages/components/MultiSelect.svx
+++ b/docs/src/pages/components/MultiSelect.svx
@@ -1,11 +1,17 @@
-### Default
+The `MultiSelect` component provides a dropdown interface for selecting multiple options using checkboxes. It supports filtering, custom formatting, and various states. Each item must have a unique `id` property for proper functionality.
-By default, items will be ordered alphabetically based on the `item.text` value. To prevent this, see [#no-alphabetical-ordering](#no-alphabetical-ordering).
+
+
Every items object must have a unique "id" property.
+
+
+## Default
+
+Create a basic multi-select dropdown with three contact methods. By default, items are ordered alphabetically.
-### No alphabetical ordering
+## Format item display text
-To prevent alphabetical item ordering, pass an empty function to the `sortItem` prop.
-
-
-
-### Initial selected items
-
-To select (or bind) items, pass an array of item ids to `selectedIds`.
-
-
-
-
-
-### Format item display text
-
-Use the `itemToString` prop to format the display of individual items.
+Format the display text of items using the `itemToString` prop. This example appends the item ID in parentheses.
{
return item.text + ' (' + item.id +')'
@@ -49,7 +32,103 @@ Use the `itemToString` prop to format the display of individual items.
sortItem="{() => {}}"
/>
-### Light variant
+## Custom slot
+
+Override the default slot to customize item rendering. This example shows how to access and use the item and index values.
+
+
+
+## No alphabetical ordering
+
+Prevent automatic alphabetical ordering by passing a no-op function to `sortItem`. This maintains the original order of items.
+
+
+
+## Filterable
+
+Enable filtering by setting `filterable` to `true`. This example includes a placeholder text for the filter input.
+
+
+
+## Initial selected items
+
+Pre-select items by passing an array of item IDs to `selectedIds`. This example pre-selects Slack and Email.
+
+
+
+## Multiple multi-select dropdowns
+
+This example demonstrates how to manage multiple dropdowns in a form with coordinated state.
+
+
+
+## Format checkbox values
+
+Customize checkbox attributes using the `itemToInput` prop. This example sets a consistent name for all checkboxes.
+
+Use the `itemToInput` prop to customize the user-selectable checkbox values.
+This will also override the underlying hidden inputs used for form submission.
+
+```js
+itemToInput={(item) => {
+ return {
+ name: `Contact_${item.id}`,
+ value: item.id
+ }
+}}
+```
+
+The above function sets the `name` attribute to
+`Contact_0` (respective to each item's `id`) for every hidden input that
+renders, along with each respective item's `id` set to the `value` attribute.
+
+ ({name: 'contact', value: item.id})}
+ titleText="Contact"
+ label="Select contact methods..."
+ items="{[
+ {id: "0", text: "Slack"},
+ {id: "1", text: "Email"},
+ {id: "2", text: "Fax"}
+ ]}"
+/>
+
+## Top direction
+
+Display the dropdown menu above the input by setting `direction` to `"top"`. This is useful when space below is limited.
+
+
+
+## Hidden label
+
+Hide the label visually while maintaining accessibility by setting `hideLabel` to `true`. The label is still available to screen readers.
+
+
+
+## Light variant
+
+Use the light variant for dark backgrounds by setting `light` to `true`. This provides better contrast in dark themes.
-### Inline type
+## Inline variant
+
+Display the dropdown inline with other content by setting `type` to `"inline"`. This removes the background and border.
-### Extra-large size
+## Extra-large size
+
+Use the extra-large size for prominent selections by setting `size` to `"xl"`. This provides more visual emphasis.
-### Small size
+## Small size
+
+Use the small size for compact layouts by setting `size` to `"sm"`. This is ideal for secondary selections.
-### Filterable
+## Invalid state
-
\ No newline at end of file
+ />
+
+## Warning state
+
+Indicate a warning state by setting `warn` to `true`. This example shows a warning about unassociated accounts.
+
+
+
+## Disabled state
+
+Disable the entire dropdown by setting `disabled` to `true`. This prevents all user interaction.
+
+
+
+## Disabled items
+
+Disable specific items using the `disabled` property in the `items` prop. This example disables the Email option.
+
+
diff --git a/docs/src/pages/components/NumberInput.svx b/docs/src/pages/components/NumberInput.svx
index c2ceff28..93e89ea3 100644
--- a/docs/src/pages/components/NumberInput.svx
+++ b/docs/src/pages/components/NumberInput.svx
@@ -7,50 +7,100 @@ components: ["NumberInput", "NumberInputSkeleton"]
import Preview from "../../components/Preview.svelte";
-### Default
+The `NumberInput` component provides a controlled input for numerical values. It supports validation, step values, and various states to ensure accurate data entry.
-
+## Default
-### With helper text
+Create a basic number input with increment and decrement controls. The input accepts numerical values and provides visual feedback.
-
+
-### Minimum and maximum values
+## No value
+
+Allow empty values by setting both `allowEmpty` to `true` and `value` to `null`. The `allowEmpty` prop enables the empty state, while `value={null}` represents no value.
+
+
+
+## Helper text
+
+Add descriptive text below the input using the `helperText` prop. This helps users understand the expected input.
+
+
+
+## Minimum and maximum values
+
+Constrain input values using `min` and `max` props. This example limits values between 4 and 20.
-### Hidden label
+## Step value
-
+Control the increment/decrement step size using the `step` prop. This example uses a step of 0.1.
-### Light variant
+
-
+## Hidden label
-### Mobile variant
+Hide the label visually while maintaining accessibility by setting `hideLabel` to `true`. The label is still available to screen readers.
-
+
-### Extra-large size
+## Extra-large size
-
+Use the extra-large size for prominent inputs by setting `size` to `"xl"`. This provides more visual emphasis.
-### Small size
+
-
+## Small size
-### Invalid state
+Use the small size for compact layouts by setting `size` to `"sm"`. This is ideal for secondary inputs.
-
+
-### Disabled state
+## Light variant
-
+Use the light variant for dark backgrounds by setting `light` to `true`. This provides better contrast in dark themes.
-### Skeleton
+
+
+## Invalid state
+
+Indicate an invalid value by setting `invalid` to `true`. This example shows a validation error.
+
+
+
+## Warning state
+
+Indicate a warning state by setting `warn` to `true`. This example shows a warning about the input value.
+
+
+
+## Disabled state
+
+Disable the input by setting `disabled` to `true`. This prevents all user interaction.
+
+
+
+## Read-only state
+
+Make the input read-only by setting `readonly` to `true`. This allows viewing but prevents editing.
+
+
+
+## Hidden steppers
+
+Hide the increment/decrement controls by setting `hideSteppers` to `true`. This provides a simpler input interface.
+
+
+
+## Skeleton
+
+Show a loading state using the `NumberInputSkeleton` component. This is useful while data is being fetched.
-### Skeleton without label
+## Skeleton without label
+
+Show a loading state without a label by setting `hideLabel` to `true`. This maintains layout consistency.
\ No newline at end of file
diff --git a/docs/src/pages/components/OrderedList.svx b/docs/src/pages/components/OrderedList.svx
index e8275202..784f118d 100644
--- a/docs/src/pages/components/OrderedList.svx
+++ b/docs/src/pages/components/OrderedList.svx
@@ -3,11 +3,21 @@ components: ["OrderedList", "ListItem"]
---
-### Default
+`OrderedList` provides a structured way to display numbered lists of items. It supports nested lists, native browser styles, and expressive typography for enhanced visual hierarchy.
+
+
+