"start" | "end"
| `"end"` | Specify alignment of accordion item chevron icon. |
-| size | "sm" | "xl"
| -- | Specify the size of the accordion. |
-| disabled | boolean
| `false` | Set to `true` to disable the accordion. |
-| skeleton | boolean
| `false` | Set to `true` to display the skeleton state. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ------------------------------------------------ |
+| align | No | let
| No | "start" | "end"
| "end"
| Specify alignment of accordion item chevron icon |
+| size | No | let
| No | "sm" | "xl"
| undefined
| Specify the size of the accordion |
+| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the accordion |
+| skeleton | No | let
| No | boolean
| false
| Set to `true` to display the skeleton state |
### Slots
-- **default**: `string
| `"title"` | Specify the title of the accordion item heading. Alternatively, use the named slot "title" (e.g. <div slot="title">...</div>). |
-| open | boolean
| `false` | Set to `true` to open the first accordion item. |
-| disabled | boolean
| `false` | Set to `true` to disable the accordion item. |
-| iconDescription | string
| `"Expand/Collapse"` | Specify the ARIA label for the accordion item chevron icon. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
+| disabled | No | let
| Yes | boolean
| false
| Set to `true` to disable the accordion item |
+| open | No | let
| Yes | boolean
| false
| Set to `true` to open the first accordion item |
+| title | No | let
| No | string
| "title"
| Specify the title of the accordion item heading.let
| No | string
| "Expand/Collapse"
| Specify the ARIA label for the accordion item chevron icon |
### Slots
-- **default**: `{title}
|
-### Forwarded events
+### Events
-- `on:animationend`
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:keydown`
+| Event name | Type | Detail |
+| :----------- | :-------- | :----- |
+| animationend | forwarded | -- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## AccordionSkeleton
-
-### Import path
-
-```js
-import { AccordionSkeleton } from "carbon-components-svelte";
-```
+## `AccordionSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :-------------------------------- | :------------ | :------------------------------------------------ |
-| count | number
| `4` | Specify the number of accordion items to render. |
-| align | "start" | "end"
| `"end"` | Specify alignment of accordion item chevron icon. |
-| size | "sm" | "xl"
| -- | Specify the size of the accordion. |
-| open | boolean
| `true` | Set to `false` to close the first accordion item. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ------------------------------------------------ |
+| count | No | let
| No | number
| 4
| Specify the number of accordion items to render |
+| align | No | let
| No | "start" | "end"
| "end"
| Specify alignment of accordion item chevron icon |
+| size | No | let
| No | "sm" | "xl"
| undefined
| Specify the size of the accordion |
+| open | No | let
| No | boolean
| true
| Set to `false` to close the first accordion item |
### 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.
-
----
-
-## AspectRatio
-
-### Import path
-
-```js
-import { AspectRatio } from "carbon-components-svelte";
-```
+## `AspectRatio`
### Props
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------------------------------------------------------------------------------------- | :------------ | :------------------------ |
-| ratio | "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2"
| `"2x1"` | Specify the aspect ratio. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------ |
+| ratio | No | let
| No | "2x1" | "2x3" | "16x9" | "4x3" | "1x1" | "3x4" | "3x2" | "9x16" | "1x2"
| "2x1"
| Specify the aspect ratio |
### Slots
-- **default**: `boolean
| `false` | Set to `true` to hide the breadcrumb trailing slash. |
-| skeleton | boolean
| `false` | Set to `true` to display skeleton state. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------------- |
+| noTrailingSlash | No | let
| No | boolean
| false
| Set to `true` to hide the breadcrumb trailing slash |
+| skeleton | No | let
| No | boolean
| false
| Set to `true` to display skeleton state |
### Slots
-- **default**: `string
| -- | Set the `href` to use an anchor link. |
-| isCurrentPage | boolean
| `false` | Set to `true` if the breadcrumb item represents the current page. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------ | :------- | :--------------- | :------- | -------------------- | ---------------------- | ---------------------------------------------------------------- |
+| href | No | let
| No | string
| undefined
| Set the `href` to use an anchor link |
+| isCurrentPage | No | let
| No | boolean
| false
| Set to `true` if the breadcrumb item represents the current page |
### Slots
-- **default**: `{props?: { ["aria-current"]?: string; class: "bx--link"; }}
| -- |
-### 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.
-
----
-
-## BreadcrumbSkeleton
-
-### Import path
-
-```js
-import { BreadcrumbSkeleton } from "carbon-components-svelte";
-```
+## `BreadcrumbSkeleton`
### Props
-| Prop name | Type | Default value | Description |
-| :-------------- | :------------------- | :------------ | :--------------------------------------------------- |
-| noTrailingSlash | boolean
| `false` | Set to `true` to hide the breadcrumb trailing slash. |
-| count | number
| `3` | Specify the number of breadcrumb items to render. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------------- |
+| noTrailingSlash | No | let
| No | boolean
| false
| Set to `true` to hide the breadcrumb trailing slash |
+| count | No | let
| No | number
| 3
| Specify the number of breadcrumb items to render |
### 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
+## `Breakpoint`
-No dispatched events.
-
----
-
-## Button
-
-### Import path
-
-```js
-import { Button } from "carbon-components-svelte";
-```
-
-### Props
-
-| Prop name | Type | Default value | Description |
-| :--------------- | :----------------------------------------------------------------------------------------- | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| kind | "primary" | "secondary" | "tertiary" | "ghost" | "danger"
| `"primary"` | Specify the kind of button. |
-| size | "default" | "field" | "small"
| `"default"` | Specify the size of button. |
-| hasIconOnly | boolean
| `false` | Set to `true` for the icon-only variant. |
-| icon | typeof import("carbon-icons-svelte/lib/Add16").default
| -- | Specify the icon from `carbon-icons-svelte` to render. |
-| iconDescription | string
| -- | Specify the ARIA label for the button icon. |
-| tooltipAlignment | "start" | "center" | "end"
| -- | Set the alignment of the tooltip relative to the icon. `hasIconOnly` must be set to `true`. |
-| tooltipPosition | "top" | "right" | "bottom" | "left"
| -- | Set the position of the tooltip relative to the icon. |
-| as | 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 | boolean
| `false` | Set to `true` to display the skeleton state. |
-| disabled | boolean
| `false` | Set to `true` to disable the button. |
-| href | string
| -- | Set the `href` to use an anchor link. |
-| tabindex | string
| `"0"` | Specify the tabindex. |
-| type | string
| `"button"` | Specify the `type` attribute for the button element. |
-| ref | null | HTMLAnchorElement | HTMLButtonElement
| `null` | Obtain a reference to the HTML element. |
-
-### Slots
-
-- **default**: `boolean
| `false` | Set to `true` to stack the buttons vertically. |
-
-### Slots
-
-- **default**: `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**: `"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**: `"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 renderlet
| 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.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 elementlet
| 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 buttonlet
| 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.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.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.let
| No | boolean
| false
| Set to `true` to wrap the text.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.let
| No | string
| "Show more"
| Specify the show more textlet
| 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**: `let
| No | boolean
| false
| Set to `true` to render a custom HTML elementlet
| 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.let
| No | (id: "clearSelection") => string
| undefined
| Override the label of the clear button when the input has a selection.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**: `{ 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**: `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**: `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 menulet
| No | null | ReadonlyArray
| null
| Specify an element or list of elements to trigger the context menu.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**: `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 variantlet
| Yes | boolean
| false
| Set to `true` to use the selected variant |
+| icon | No | let
| Yes | any
| undefined
| Specify the icon to renderlet
| 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.let
| No | string
| ""
| Specify the shortcut text.let
| No | string
| "ccs-" + Math.random().toString(36)
| Specify the id<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**: `"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 DataTableKeylet
| Yes | ReadonlyArray
| []
| Specify the row ids to be selected |
+| selectable | No | let
| Yes | boolean
| false
| Set to `true` for the selectable variantlet
| Yes | ReadonlyArray
| []
| Specify the row ids to be expanded |
+| expandable | No | let
| Yes | boolean
| false
| Set to `true` for the expandable variantlet
| 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 renderlet
| 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 elementslet
| 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 columnslet
| 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 headerslet
| 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)let
| Yes | string
| ""
| Specify the date picker start date value (from)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.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.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"**: `"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.let
| No | string
| ""
| Specify the label description.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.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 elementlet
| 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.let
| No | string
| ""
| Specify the platform name.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.let
| No | any
| undefined
| Specify the icon to render for the closed state.let
| No | any
| undefined
| Specify the icon to render for the opened state.{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.let
| No | any
| undefined
| Specify the icon to render when the action panel is open.let
| No | string
| undefined
| Specify the text displayed next to the icon.let
| No | string
| undefined
| Specify an icon tooltip. The tooltip will not be displayedlet
| No | "start" | "center" | "end"
| "center"
| Set the alignment of the tooltip relative to the icon.let
| No | false | import("svelte/transition").SlideParams
| { duration: 200 }
| Customize the panel transition (i.e., `transition:slide`).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 loadconst
| 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.let
| No | number
| 1500
| Specify the timeout delay (ms) after `status` is set to "success" |
### Slots
-- **default**: `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**: `{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 renderlet
| 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**: `<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**: `string
| -- | Set an id to be used by the label element. |
-
-### Slots
-
-- **default**: `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**: `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**: `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**: `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**: `string
| -- | Specify the ARIA label for the nav. |
-
-### Slots
-
-- **default**: `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**: `string
| -- | Specify the `href` attribute. |
-| ref | null | HTMLAnchorElement
| `null` | Obtain a reference to the HTML anchor element. |
-
-### Slots
-
-- **default**: `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**: `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**: `"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**: `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**: `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**: `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**: `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**: `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**: `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**: `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" eventslet
| 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 modallet
| 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**: `{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**: `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 modallet
| 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 logiclet
| 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 logiclet
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: import("../ListBox/ListBoxSelection.svelte").ListBoxSelectionTranslationId) => string
| undefined
| Override the label of the clear button when the input has a selection.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: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
-
-No dispatched events.
-
----
-
-## NotificationActionButton
-
-### Import path
-
-```js
-import { NotificationActionButton } from "carbon-components-svelte";
-```
+## `NotificationActionButton`
### Props
-No exported props.
+None.
### Slots
-- **default**: `"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**: `"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"**: `let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
+| value | No | let
| Yes | null | number
| null
| Specify the input value.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. |
+| 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**: `"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**: `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.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**: `<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.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 thelet
| 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**: `{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**: `{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**: `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**: `{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**: `{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**: `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 elementlet
| 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.let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the input element |
### Slots
-- **default**: `{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**: `{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 textlet
| 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**: `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**: `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**: `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.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**: `{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**: `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**: `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**: `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 spanlet
| 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.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**: `{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**: `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**: `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**: `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**: `"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**: `let
| No | number
| 5
| Specify the number of rows |
### Slots
-- **default**: `let
| Yes | null | HTMLButtonElement
| null
| Obtain a reference to the button HTML element |
+| selected | No | let
| Yes | boolean
| false
| Set to `true` for the switch to be selected |
+| text | No | let
| No | string
| "Provide text"
| Specify the switch text.let
| No | boolean
| false
| Set to `true` to disable the switch |
+| id | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the button element |
### Slots
-- **default**: `{text}
|
-### Forwarded events
+### Events
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
-### Dispatched events
-
-No dispatched events.
-
----
-
-## TableContainer
-
-### Import path
-
-```js
-import { TableContainer } from "carbon-components-svelte";
-```
+## `Tab`
### Props
-| Prop name | Type | Default value | Description |
-| :----------- | :------------------- | :------------ | :----------------------------------------- |
-| title | string
| `""` | Specify the title of the data table. |
-| description | string
| `""` | Specify the description of the data table. |
-| stickyHeader | boolean
| `false` | Set to `true` to enable a sticky header. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
+| ref | No | let
| Yes | null | HTMLAnchorElement
| null
| Obtain a reference to the anchor HTML element |
+| label | No | let
| No | string
| ""
| Specify the tab label.let
| No | string
| "#"
| Specify the href attribute |
+| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the tab |
+| 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 element |
### Slots
-- **default**: `{label}
|
-No forwarded events.
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
-No dispatched events.
-
----
-
-## TableHead
-
-### Import path
-
-```js
-import { TableHead } from "carbon-components-svelte";
-```
+## `TabContent`
### Props
-No exported props.
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | ------------------- | ------------------------------------------------ | ----------------------------------- |
+| id | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the top-level element |
### Slots
-- **default**: `string
| `"col"` | Specify the `scope` attribute. |
-| translateWithId | () => string
| -- | Override the default id translations. |
-| id | string
| -- | Set an id for the top-level element. |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :------------- | :------- | :--------------- | :------- | ------------------------------------------------------------------- | ---------------------- | ---------------------------------------------- |
+| size | No | let
| No | "compact" | "short" | "medium" | "tall"
| undefined
| Set the size of the table |
+| zebra | No | let
| No | boolean
| false
| Set to `true` to use zebra styles |
+| useStaticWidth | No | let
| No | boolean
| false
| Set to `true` to use static width |
+| sortable | No | let
| No | boolean
| false
| Set to `true` for the sortable variant |
+| stickyHeader | No | let
| No | boolean
| false
| Set to `true` to enable a sticky header |
+| tableStyle | No | let
| No | string
| undefined
| Set the style attribute on the `table` element |
### Slots
-- **default**: `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**: `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**: `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**: `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**: `{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 |
-| :---------- | :---------------------------------------- | :------------ | :--------------------------------------------- |
-| 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**: `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.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**: `{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**: `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 tokenslet
| 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**: `{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{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**: `{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**: `Cancel
|
+
+### Events
+
+| Event name | Type | Detail |
+| :--------- | :--------- | :---------------- |
+| cancel | dispatched | null
|
-### Forwarded events
+## `ToolbarContent`
-No forwarded events.
+### Props
-### Dispatched events
+None.
-No dispatched events.
+### Slots
----
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-## ToolbarMenuItem
+### Events
-### Import path
+None.
-```js
-import { ToolbarMenuItem } from "carbon-components-svelte";
-```
+## `ToolbarMenu`
### Props
-No exported props.
+None.
### Slots
-- **default**: `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.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.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**: `{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.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**: `<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 idlet
| 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.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.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`.{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } }
| {node.text}
|
+| labelText | No | -- | {labelText}
|
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
-- `on:focus`
+### Events
-### Dispatched events
+| Event name | Type | Detail |
+| :--------- | :--------- | :------------------------------------------------------------ |
+| select | dispatched | TreeNode & { expanded: boolean; leaf: boolean; }
|
+| toggle | dispatched | TreeNode & { expanded: boolean; leaf: boolean; }
|
+| focus | dispatched | TreeNode & { expanded: boolean; leaf: boolean; }
|
+| keydown | forwarded | -- |
-No dispatched events.
+## `Truncate`
----
+### Props
-## UnorderedList
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------- | ------------------ | ----------- |
+| clamp | No | let
| No | "end" | "front"
| "end"
| -- |
-### Import path
+### Slots
-```js
-import { UnorderedList } from "carbon-components-svelte";
-```
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-### Props
+### Events
-| Prop name | Type | Default value | Description |
-| :-------- | :------------------- | :------------ | :--------------------------------------- |
-| nested | boolean
| `false` | Set to `true` to use the nested variant. |
+None.
-### Slots
+## `UnorderedList`
-- **default**: `let
| No | boolean
| false
| Set to `true` to use the nested variant |
+| expressive | No | let
| No | boolean
| false
| Set to `true` to use Carbon's expressive typesetting |
-- `on:click`
-- `on:mouseover`
-- `on:mouseenter`
-- `on:mouseleave`
+### Slots
-### Dispatched events
+| Slot name | Default | Props | Fallback |
+| :-------- | :------ | :---- | :------- |
+| -- | Yes | -- | -- |
-No dispatched events.
+### Events
----
+| Event name | Type | Detail |
+| :--------- | :-------- | :----- |
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9b759e9c..7a4e1cdf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,13 +1,11 @@
# Contributing
-Note: before submitting a pull request (PR), it is recommended to first [file an issue](https://github.com/IBM/carbon-components-svelte/issues).
+Before submitting a pull request (PR), consider [filing an issue](https://github.com/carbon-design-system/carbon-components-svelte/issues) to gain clarity and direction.
## Prerequisites
-This project requires Node.js (version 12 or greater) and Yarn (version 1 or greater).
-
-- [Node.js](https://nodejs.org/en/download/package-manager/)
-- [Yarn](https://classic.yarnpkg.com/en/docs/install)
+- [Node.js](https://nodejs.org/en/download/package-manager/) (version >=20)
+- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-installer-to-install-nodejs-and-npm)
## Project set-up
@@ -21,42 +19,35 @@ cd carbon-components-svelte
Set the original repository as the upstream:
```sh
-git remote add upstream git@github.com:IBM/carbon-components-svelte.git
+git remote add upstream git@github.com:carbon-design-system/carbon-components-svelte.git
# verify that the upstream is added
git remote -v
```
### Install
-Install the project dependencies:
+Install the project dependencies.
```sh
-# carbon-components-svelte/
-yarn install
+npm install
```
## Documentation set-up
Component documentation is located in the `docs` folder. The website is built using svite, routify, and MDsveX. You will need to create a symbolic project link in order to see live changes reflected when developing locally.
-First, create a symbolic link at the root of the project folder:
+First, create a symbolic link at the root of the project:
```sh
-# carbon-components-svelte/
-yarn link
+npm link
```
-Go into the `docs` folder:
+Then, go into `docs` and link the package.
```sh
cd docs
-```
-
-Link `"carbon-components-svelte"`:
-
-```sh
-yarn link "carbon-components-svelte"
-yarn install
+npm link "carbon-components-svelte"
+npm install
```
If linked correctly, any change to a component in the `src` folder should be reflected in the `docs` site.
@@ -65,15 +56,21 @@ If linked correctly, any change to a component in the `src` folder should be ref
## Development workflow
+Create a topic branch from `master`. Keep your PR focused and branch up-to-date with upstream `master`.
+
+```sh
+git checkout -b new-feature
+```
+
Preview changes to components from the `src` folder in the documentation website located in `docs/`.
In the `docs` folder, run:
```sh
-yarn dev
+npm run dev
```
-The site should be served at `http://localhost:3000/` (or the next available port).
+The site should be served at http://localhost:5173/ (or the next available port).
### Component Format
@@ -83,8 +80,8 @@ Each component should adopt the following structure:
src/Component
│
└───Component.svelte // main component
-└───Component.Skeleton.svelte // Skeleton component (if any)
-└───index.js // export components (e.g. `Component.svelte`, `Component.Skeleton.svelte`)
+└───ComponentSkeleton.svelte // Skeleton component (if applicable)
+└───index.js // export components
```
### Editing a component
@@ -93,15 +90,15 @@ If adding or editing an exported component prop, be sure to annotate its value u
```js
/**
- * Set to `true` to disable the tab
- * @type {boolean} [disabled=false]
+ * Specify the size of the component
+ * @type {"sm" | "default" | "lg"}
*/
-export let disabled = false;
+export let size = "default";
```
### Creating a component
-First, [submit an issue](https://github.com/IBM/carbon-components-svelte/issues).
+First, [submit an issue](https://github.com/carbon-design-system/carbon-components-svelte/issues).
If creating a new component, don't forget it from `src/index.js`:
@@ -117,23 +114,14 @@ export {
} from "./ComposedModal";
```
-### Build
+### Run `npm run build:docs`
-Verify that you can build the library by running the following command at the project root:
+Run the following command to re-generate TypeScript definitions and documentation.
```sh
-# carbon-components-svelte/
-yarn prepack
+npm run build:docs
```
-This does several things:
-
-- uses `node-sass` to pre-compile CSS StyleSheets in the `css` folder
-- uses Rollup to bundle the Svelte components in `src` in ESM/UMD formats; emitted to `lib`
-- uses a Rollup plugin to:
- - generate component documentation in Markdown format (`COMPONENT_INDEX.md`)
- - generate TypeScript definitions (`types/index.d.ts`)
-
## Submit a Pull Request
### Sync Your Fork
@@ -149,3 +137,51 @@ git merge upstream/master
### Submit a PR
After you've pushed your changes to remote, submit your PR. Make sure you are comparing `{label}
", + "slot_props": "{\n props: {\n class: \"bx--progress-label\";\n };\n}" + } + ], + "events": [ + { + "type": "forwarded", + "name": "click", + "element": "button" + }, + { + "type": "forwarded", + "name": "mouseover", + "element": "button" + }, + { + "type": "forwarded", + "name": "mouseenter", + "element": "button" + }, + { + "type": "forwarded", + "name": "mouseleave", + "element": "button" + }, + { + "type": "forwarded", + "name": "keydown", + "element": "button" + } + ], + "typedefs": [], + "generics": null, + "rest_props": { + "type": "Element", + "name": "li" + } + }, + { + "moduleName": "RadioButton", + "filePath": "src/RadioButton/RadioButton.svelte", + "props": [ + { + "name": "value", + "kind": "let", + "description": "Specify the value of the radio button", + "type": "string | number", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "checked", + "kind": "let", + "description": "Set to `true` to check the radio button", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": true + }, + { + "name": "disabled", + "kind": "let", + "description": "Set to `true` to disable the radio button", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "required", + "kind": "let", + "description": "Set to `true` to mark the field as required", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "labelPosition", + "kind": "let", + "description": "Specify the label position", + "type": "\"right\" | \"left\"", + "value": "\"right\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "labelText", + "kind": "let", + "description": "Specify the label text", + "type": "string", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "hideLabel", + "kind": "let", + "description": "Set to `true` to visually hide the label text", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "id", + "kind": "let", + "description": "Set an id for the input element", + "type": "string", + "value": "\"ccs-\" + Math.random().toString(36)", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "name", + "kind": "let", + "description": "Specify a name attribute for the radio button input", + "type": "string", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "ref", + "kind": "let", + "description": "Obtain a reference to the input HTML element", + "type": "null | HTMLInputElement", + "value": "null", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": true + } + ], + "moduleExports": [], + "slots": [ + { + "name": "labelText", + "default": false, + "fallback": "{labelText}", + "slot_props": "{}" + } + ], + "events": [ + { + "type": "forwarded", + "name": "focus", + "element": "input" + }, + { + "type": "forwarded", + "name": "blur", + "element": "input" + }, + { + "type": "forwarded", + "name": "change", + "element": "input" + } + ], + "typedefs": [], + "generics": null, + "rest_props": { + "type": "Element", + "name": "div" + } + }, + { + "moduleName": "RadioButtonGroup", + "filePath": "src/RadioButtonGroup/RadioButtonGroup.svelte", + "props": [ + { + "name": "selected", + "kind": "let", + "description": "Set the selected radio button value", + "type": "string | number", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": true + }, + { + "name": "disabled", + "kind": "let", + "description": "Set to `true` to disable the radio buttons", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "required", + "kind": "let", + "description": "Set to `true` to require the selection of a radio button", + "type": "boolean", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "name", + "kind": "let", + "description": "Specify a name attribute for the radio button inputs", + "type": "string", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "legendText", + "kind": "let", + "description": "Specify the legend text", + "type": "string", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "hideLegend", + "kind": "let", + "description": "Set to `true` to visually hide the legend", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "labelPosition", + "kind": "let", + "description": "Specify the label position", + "type": "\"right\" | \"left\"", + "value": "\"right\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "orientation", + "kind": "let", + "description": "Specify the orientation of the radio buttons", + "type": "\"horizontal\" | \"vertical\"", + "value": "\"horizontal\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "id", + "kind": "let", + "description": "Set an id for the container div element", + "type": "string", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + } + ], + "moduleExports": [], + "slots": [ + { + "name": "__default__", + "default": true, + "slot_props": "{}" + }, + { + "name": "legendText", + "default": false, + "fallback": "{legendText}", + "slot_props": "{}" + } + ], + "events": [ + { + "type": "dispatched", + "name": "change", + "detail": "string | number" + }, + { + "type": "forwarded", + "name": "click", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseover", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseenter", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseleave", + "element": "div" + } + ], + "typedefs": [], + "generics": null, + "rest_props": { + "type": "Element", + "name": "div" + } + }, + { + "moduleName": "RadioButtonSkeleton", + "filePath": "src/RadioButton/RadioButtonSkeleton.svelte", + "props": [], + "moduleExports": [], + "slots": [], + "events": [ + { + "type": "forwarded", + "name": "click", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseover", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseenter", + "element": "div" + }, + { + "type": "forwarded", + "name": "mouseleave", + "element": "div" + } + ], + "typedefs": [], + "generics": null, + "rest_props": { + "type": "Element", + "name": "div" + } + }, + { + "moduleName": "RadioTile", + "filePath": "src/Tile/RadioTile.svelte", + "props": [ + { + "name": "checked", + "kind": "let", + "description": "Set to `true` to check the tile", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": true + }, + { + "name": "light", + "kind": "let", + "description": "Set to `true` to enable the light variant", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "disabled", + "kind": "let", + "description": "Set to `true` to disable the tile", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "required", + "kind": "let", + "description": "Set to `true` to mark the field as required", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "value", + "kind": "let", + "description": "Specify the value of the radio input", + "type": "string", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "tabindex", + "kind": "let", + "description": "Specify the tabindex", + "type": "string", + "value": "\"0\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "iconDescription", + "kind": "let", + "description": "Specify the ARIA label for the radio tile checkmark icon", + "type": "string", + "value": "\"Tile checkmark\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "id", + "kind": "let", + "description": "Set an id for the input element", + "type": "string", + "value": "\"ccs-\" + Math.random().toString(36)", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "name", + "kind": "let", + "description": "Specify a name attribute for the radio tile input", + "type": "string", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + } + ], + "moduleExports": [], + "slots": [ + { + "name": "__default__", + "default": true, + "slot_props": "{}" + } + ], + "events": [ + { + "type": "forwarded", + "name": "change", + "element": "input" + }, + { + "type": "forwarded", + "name": "keydown", + "element": "input" + }, + { + "type": "forwarded", + "name": "click", + "element": "label" + }, + { + "type": "forwarded", + "name": "mouseover", + "element": "label" + }, + { + "type": "forwarded", + "name": "mouseenter", + "element": "label" + }, + { + "type": "forwarded", + "name": "mouseleave", + "element": "label" + } + ], + "typedefs": [], + "generics": null, + "rest_props": { + "type": "Element", + "name": "label" + } + }, + { + "moduleName": "RecursiveList", + "filePath": "src/RecursiveList/RecursiveList.svelte", + "props": [ + { + "name": "nodes", + "kind": "let", + "description": "Specify the nodes to render", + "type": "Array{label}
\n\n \n" - } - ] - ], - "forwarded_events": [ - [ - "click", - { - "start": 1911, - "end": 1919, - "type": "EventHandler", - "name": "click", - "modifiers": [], - "expression": null - } - ], - [ - "mouseover", - { - "start": 2015, - "end": 2027, - "type": "EventHandler", - "name": "mouseover", - "modifiers": [], - "expression": null - } - ], - [ - "mouseenter", - { - "start": 2032, - "end": 2045, - "type": "EventHandler", - "name": "mouseenter", - "modifiers": [], - "expression": null - } - ], - [ - "mouseleave", - { - "start": 2050, - "end": 2063, - "type": "EventHandler", - "name": "mouseleave", - "modifiers": [], - "expression": null - } - ], - [ - "keydown", - { - "start": 2068, - "end": 2078, - "type": "EventHandler", - "name": "keydown", - "modifiers": [], - "expression": null - } - ] - ], - "dispatched_events": [] - }, - "RadioButton": { - "moduleName": "RadioButton", - "props": [ - [ - "value", - { - "kind": "let", - "value": "\"\"", - "type": "string", - "description": "Specify the value of the radio button" - } - ], - [ - "checked", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to check the radio button" - } - ], - [ - "disabled", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to disable the radio button" - } - ], - [ - "labelPosition", - { - "kind": "let", - "value": "\"right\"", - "type": "\"right\" | \"left\"", - "description": "Specify the label position" - } - ], - [ - "labelText", - { - "kind": "let", - "value": "\"\"", - "type": "string", - "description": "Specify the label text" - } - ], - [ - "hideLabel", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to visually hide the label text" - } - ], - [ - "id", - { - "kind": "let", - "type": "string", - "description": "Set an id for the input element" - } - ], - [ - "name", - { - "kind": "let", - "value": "\"\"", - "type": "string", - "description": "Specify a name attribute for the checkbox input" - } - ], - [ - "ref", - { - "kind": "let", - "value": "null", - "type": "null | HTMLInputElement", - "description": "Obtain a reference to the input HTML element" - } - ] - ], - "slots": [], - "forwarded_events": [ - [ - "change", - { - "start": 1814, - "end": 1823, - "type": "EventHandler", - "name": "change", - "modifiers": [], - "expression": null - } - ] - ], - "dispatched_events": [] - }, - "RadioButtonGroup": { - "moduleName": "RadioButtonGroup", - "props": [ - [ - "selected", - { - "kind": "let", - "type": "string", - "description": "Set the selected radio button value" - } - ], - [ - "disabled", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to disable the radio buttons" - } - ], - [ - "labelPosition", - { - "kind": "let", - "value": "\"right\"", - "type": "\"right\" | \"left\"", - "description": "Specify the label position" - } - ], - [ - "orientation", - { - "kind": "let", - "value": "\"horizontal\"", - "type": "\"horizontal\" | \"vertical\"", - "description": "Specify the orientation of the radio buttons" - } - ], - [ - "id", - { - "kind": "let", - "type": "string", - "description": "Set an id for the container div element" - } - ] - ], - "slots": [ - [ - "default", - { - "attributes": [], - "children": [], - "default": true, - "default_value": "" - } - ] - ], - "forwarded_events": [ - [ - "click", - { - "start": 1244, - "end": 1252, - "type": "EventHandler", - "name": "click", - "modifiers": [], - "expression": null - } - ], - [ - "mouseover", - { - "start": 1255, - "end": 1267, - "type": "EventHandler", - "name": "mouseover", - "modifiers": [], - "expression": null - } - ], - [ - "mouseenter", - { - "start": 1270, - "end": 1283, - "type": "EventHandler", - "name": "mouseenter", - "modifiers": [], - "expression": null - } - ], - [ - "mouseleave", - { - "start": 1286, - "end": 1299, - "type": "EventHandler", - "name": "mouseleave", - "modifiers": [], - "expression": null - } - ] - ], - "dispatched_events": [ - [ - "change", - { - "detail": "$selectedValue" - } - ] - ] - }, - "RadioButtonSkeleton": { - "moduleName": "RadioButtonSkeleton", - "props": [], - "slots": [], - "forwarded_events": [ - [ - "click", - { - "start": 68, - "end": 76, - "type": "EventHandler", - "name": "click", - "modifiers": [], - "expression": null - } - ], - [ - "mouseover", - { - "start": 79, - "end": 91, - "type": "EventHandler", - "name": "mouseover", - "modifiers": [], - "expression": null - } - ], - [ - "mouseenter", - { - "start": 94, - "end": 107, - "type": "EventHandler", - "name": "mouseenter", - "modifiers": [], - "expression": null - } - ], - [ - "mouseleave", - { - "start": 110, - "end": 123, - "type": "EventHandler", - "name": "mouseleave", - "modifiers": [], - "expression": null - } - ] - ], - "dispatched_events": [] - }, - "RadioTile": { - "moduleName": "RadioTile", - "props": [ - [ - "checked", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to check the tile" - } - ], - [ - "light", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to enable the light variant" - } - ], - [ - "value", - { - "kind": "let", - "value": "\"\"", - "type": "string", - "description": "Specify the value of the radio input" - } - ], - [ - "tabindex", - { - "kind": "let", - "value": "\"0\"", - "type": "string", - "description": "Specify the tabindex" - } - ], - [ - "iconDescription", - { - "kind": "let", - "value": "\"Tile checkmark\"", - "type": "string", - "description": "Specify the ARIA label for the radio tile checkmark icon" - } - ], - [ - "id", - { - "kind": "let", - "type": "string", - "description": "Set an id for the input element" - } - ], - [ - "name", - { - "kind": "let", - "value": "\"\"", - "type": "string", - "description": "Specify a name attribute for the input" - } - ] - ], - "slots": [ - [ - "default", - { - "attributes": [], - "children": [], - "default": true, - "default_value": "" - } - ] - ], - "forwarded_events": [ - [ - "change", - { - "start": 1295, - "end": 1304, - "type": "EventHandler", - "name": "change", - "modifiers": [], - "expression": null - } - ], - [ - "keydown", - { - "start": 1354, - "end": 1364, - "type": "EventHandler", - "name": "keydown", - "modifiers": [], - "expression": null - } - ], - [ - "click", - { - "start": 1678, - "end": 1686, - "type": "EventHandler", - "name": "click", - "modifiers": [], - "expression": null - } - ], - [ - "mouseover", - { - "start": 1689, - "end": 1701, - "type": "EventHandler", - "name": "mouseover", - "modifiers": [], - "expression": null - } - ], - [ - "mouseenter", - { - "start": 1704, - "end": 1717, - "type": "EventHandler", - "name": "mouseenter", - "modifiers": [], - "expression": null - } - ], - [ - "mouseleave", - { - "start": 1720, - "end": 1733, - "type": "EventHandler", - "name": "mouseleave", - "modifiers": [], - "expression": null - } - ] - ], - "dispatched_events": [] - }, - "Row": { - "moduleName": "Row", - "props": [ - [ - "as", - { - "kind": "let", - "value": "false", - "type": "boolean", - "description": "Set to `true` to render a custom HTML element\nProps are destructured as `props` in the default slot (e.g.
+ Source code:
+
$1
")}.
+ No props.
+{/if} + +No typedefs.
+{/if} + +No slots.
+{/if} + +No forwarded events.
+{/if} + +No dispatched events.
+{/if} + +{component.moduleName}
+ spreads
+ $$restProps
+ to the
+ {#if component.rest_props.type === "Element"}
+ {component.rest_props.name}
+ element.
+ {:else}{component.rest_props.name}
component.{/if}
+ {:else}This component does not spread restProps
{/if}
+{typeMap[type]}
- {:else if type.startsWith('(')}
- {type}
- {:else}
- {prop[1].value}
- No props.
-{/if} -No slots.
-{/if} - -No forwarded events.
-{/if} - -No dispatched events.
-{/if} diff --git a/docs/src/components/Footer.svelte b/docs/src/components/Footer.svelte deleted file mode 100644 index c74fe3b7..00000000 --- a/docs/src/components/Footer.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/docs/src/components/InlineSnippet.svelte b/docs/src/components/InlineSnippet.svelte index de3f4d50..b908e575 100644 --- a/docs/src/components/InlineSnippet.svelte +++ b/docs/src/components/InlineSnippet.svelte @@ -1,22 +1,16 @@ +- Component API documentation is + API documentation is - auto-generated + auto-generated by sveld. - from a build script.
v{process.env.VERSION || ''}
+
+ Carbon Components Svelte v{process.env.VERSION || ""}
-
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.
Analyze text to extract meta-data from content such as concepts, entities, emotion, relations, sentiment and more.
Translate text, documents, and websites from one language to another. Create industry or region-specific translations via the service's customization capability.
items
object must have a unique "id" property.- {JSON.stringify(row, null, 2)} --
{JSON.stringify(row, null, 2)}+
{JSON.stringify(row, null, 2)}+
{JSON.stringify(row, null, 2)}+
{JSON.stringify(row, null, 2)}+
- {JSON.stringify(row, null, 2)} --
{JSON.stringify(row, null, 2)}+
items
object must have a unique "id" property.items
object must have a unique "id" property.+ Storage tiers may vary based on geolocation. +
+html
prop is not sanitized.
+