Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

carbon-components-svelte

Package Overview
Dependencies
Maintainers
1
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carbon-components-svelte

Svelte implementation of the Carbon Design System

  • 0.9.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
increased by18.76%
Maintainers
1
Weekly downloads
 
Created
Source

carbon-components-svelte

NPM Build

Svelte implementation of the Carbon Design System

Getting Started

carbon-components-svelte can be installed as a development dependency.

yarn add -D carbon-components-svelte

Usage

<script>
  import { Button } from "carbon-components-svelte";
</script>

<svelte:head>
  <link
    rel="stylesheet"
    href="https://unpkg.com/carbon-components/css/carbon-components.min.css"
  />
</svelte:head>

<Button>Primary</Button>

Components

147 components exported from "carbon-components-svelte"

Component Index

AccordionSkeleton

Usage

Component Group: Accordion

Import Path

import { AccordionSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
countnumber4
openbooleantrue

Accordion

Usage

Component Group: Accordion

Import Path

import { Accordion } from "carbon-components-svelte";

API

Prop nameTypeDefault
align"start" | "end""end"
skeletonbooleanfalse

AccordionItem

Usage

Component Group: Accordion

Import Path

import { AccordionItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
titlestring"title"
openbooleanfalse
iconDescriptionstring"Expand/Collapse"

BreadcrumbSkeleton

Usage

Component Group: Breadcrumb

Import Path

import { BreadcrumbSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
noTrailingSlashbooleanfalse
countnumber3

Breadcrumb

Usage

Component Group: Breadcrumb

Import Path

import { Breadcrumb } from "carbon-components-svelte";

API

Prop nameTypeDefault
noTrailingSlashbooleanfalse
skeletonbooleanfalse

BreadcrumbItem

Usage

Component Group: Breadcrumb

Import Path

import { BreadcrumbItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
hrefstring-
isCurrentPagebooleanfalse

ButtonSkeleton

Usage

Component Group: Button

Import Path

import { ButtonSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hrefstring-
smallbooleanfalse

Button

Usage

Component Group: Button

Import Path

import { Button } from "carbon-components-svelte";

API

Prop nameTypeDefault
kind"primary" | "secondary" | "tertiary" | "ghost" | "danger""primary"
size"default" | "field" | "small""default"
hasIconOnlybooleanfalse
icontypeof import("carbon-icons-svelte/lib/Add16").default-
iconDescriptionstring-
tooltipAlignment"start" | "center" | "end"-
tooltipPosition"top" | "right" | "bottom" | "left"-
asbooleanfalse
skeletonbooleanfalse
disabledbooleanfalse
hrefstring-
tabindexstring"0"
typestring"button"
refnull | HTMLAnchorElement | HTMLButtonElementnull

CheckboxSkeleton

Usage

Component Group: Checkbox

Import Path

import { CheckboxSkeleton } from "carbon-components-svelte";

API

No exported props.


Checkbox

Usage

Component Group: Checkbox

Import Path

import { Checkbox } from "carbon-components-svelte";

API

Prop nameTypeDefault
checkedbooleanfalse
indeterminatebooleanfalse
skeletonbooleanfalse
readonlybooleanfalse
disabledbooleanfalse
labelTextstring""
hideLabelbooleanfalse
namestring""
titlestring-
idstring-
refnull | HTMLInputElementnull

CodeSnippetSkeleton

Usage

Component Group: CodeSnippet

Import Path

import { CodeSnippetSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
type"single" | "inline" | "multi""single"

CodeSnippet

Usage

Component Group: CodeSnippet

Import Path

import { CodeSnippet } from "carbon-components-svelte";

API

Prop nameTypeDefault
type"single" | "inline" | "multi""single"
codestring-
expandedbooleanfalse
lightbooleanfalse
skeletonbooleanfalse
copyButtonDescriptionstring-
copyLabelstring-
feedbackstring"Copied!"
feedbackTimeoutnumber2000
showLessTextstring"Show more"
showMoreLessbooleanfalse
idstring-
refnull | HTMLPreElementnull

ComboBox

Usage

Component Group: ComboBox

Import Path

import { ComboBox } from "carbon-components-svelte";

API

Prop nameTypeDefault
itemsComboBoxItem[][]
itemToString(item: ComboBoxItem) => string(item: ComboBoxItem) => string
selectedIndexnumber-1
valuestring""
size"sm" | "xl"-
disabledbooleanfalse
titleTextstring""
placeholderstring""
helperTextstring""
invalidTextstring""
invalidbooleanfalse
lightbooleanfalse
openbooleanfalse
shouldFilterItem(item: ComboBoxItem, value: string) => boolean() => true
translateWithId(id: any) => string-
idstring-
namestring-
refnull | HTMLInputElementnull

ComposedModal

Usage

Component Group: ComposedModal

Import Path

import { ComposedModal } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"xs" | "sm" | "lg"-
openbooleanfalse
dangerbooleanfalse
containerClassstring""
selectorPrimaryFocusstring"[data-modal-primary-focus]"
refnull | HTMLElementnull

ModalBody

Usage

Component Group: ComposedModal

Import Path

import { ModalBody } from "carbon-components-svelte";

API

Prop nameTypeDefault
hasFormbooleanfalse
hasScrollingContentbooleanfalse

ModalFooter

Usage

Component Group: ComposedModal

Import Path

import { ModalFooter } from "carbon-components-svelte";

API

Prop nameTypeDefault
primaryButtonTextstring""
primaryButtonDisabledbooleanfalse
primaryClassstring-
secondaryButtonTextstring""
secondaryClassstring-
dangerbooleanfalse

ModalHeader

Usage

Component Group: ComposedModal

Import Path

import { ModalHeader } from "carbon-components-svelte";

API

Prop nameTypeDefault
titlestring""
labelstring""
labelClassstring""
titleClassstring""
closeClassstring""
closeIconClassstring""
iconDescriptionstring"Close"

ContentSwitcher

Usage

Component Group: ContentSwitcher

Import Path

import { ContentSwitcher } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedIndexnumber0
lightbooleanfalse

Switch

Usage

Component Group: ContentSwitcher

Import Path

import { Switch } from "carbon-components-svelte";

API

Prop nameTypeDefault
textstring"Provide text"
selectedbooleanfalse
disabledbooleanfalse
idstring-
refnull | HTMLButtonElementnull

Copy

Usage

Component Group: Copy

Import Path

import { Copy } from "carbon-components-svelte";

API

Prop nameTypeDefault
feedbackstring"Copied!"
feedbackTimeoutnumber2000
refnull | HTMLButtonElementnull

CopyButton

Usage

Component Group: CopyButton

Import Path

import { CopyButton } from "carbon-components-svelte";

API

Prop nameTypeDefault
iconDescriptionstring"Copy to clipboard"

DataTable

Usage

Component Group: DataTable

Import Path

import { DataTable } from "carbon-components-svelte";

API

Prop nameTypeDefault
headers{key: string; value: string;}[]
rowsObject[][]
size"compact" | "short" | "tall"-
titlestring""
descriptionstring""
zebrabooleanfalse
sortablebooleanfalse
stickyHeaderbooleanfalse

Table

Usage

Component Group: DataTable

Import Path

import { Table } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"compact" | "short" | "tall"-
zebrabooleanfalse
useStaticWidthbooleanfalse
shouldShowBorderbooleanfalse
sortablebooleanfalse
stickyHeaderbooleanfalse

TableBody

Usage

Component Group: DataTable

Import Path

import { TableBody } from "carbon-components-svelte";

API

No exported props.


TableCell

Usage

Component Group: DataTable

Import Path

import { TableCell } from "carbon-components-svelte";

API

No exported props.


TableContainer

Usage

Component Group: DataTable

Import Path

import { TableContainer } from "carbon-components-svelte";

API

Prop nameTypeDefault
titlestring""
descriptionstring""
stickyHeaderbooleanfalse

TableHead

Usage

Component Group: DataTable

Import Path

import { TableHead } from "carbon-components-svelte";

API

No exported props.


TableHeader

Usage

Component Group: DataTable

Import Path

import { TableHeader } from "carbon-components-svelte";

API

Prop nameTypeDefault
scopestring"col"
translateWithId() => string() => ""
idstring-

TableRow

Usage

Component Group: DataTable

Import Path

import { TableRow } from "carbon-components-svelte";

API

Prop nameTypeDefault
isSelectedbooleanfalse

DataTableSkeleton

Usage

Component Group: DataTableSkeleton

Import Path

import { DataTableSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
columnsnumber5
rowsnumber5
compactbooleanfalse
zebrabooleanfalse
headersstring[][]

DatePickerSkeleton

Usage

Component Group: DatePicker

Import Path

import { DatePickerSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
rangebooleanfalse
idstring-

DatePicker

Usage

Component Group: DatePicker

Import Path

import { DatePicker } from "carbon-components-svelte";

API

Prop nameTypeDefault
datePickerType"simple" | "single" | "range""simple"
valuestring""
appendToHTMLElementdocument.body
dateFormatstring"m/d/Y"
maxDatenull | string | Datenull
minDatenull | string | Datenull
localestring"en"
shortbooleanfalse
lightbooleanfalse
idstring-

DatePickerInput

Usage

Component Group: DatePicker

Import Path

import { DatePickerInput } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"sm" | "xl"-
typestring"text"
placeholderstring""
iconDescriptionstring""
idstring-
invalidbooleanfalse
invalidTextstring""
refnull | HTMLInputElementnull

DropdownSkeleton

Usage

Component Group: Dropdown

Import Path

import { DropdownSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
inlinebooleanfalse

Dropdown

Usage

Component Group: Dropdown

Import Path

import { Dropdown } from "carbon-components-svelte";

API

Prop nameTypeDefault
itemsDropdownItem[][]
itemToString(item: DropdownItem) => string(item: DropdownItem) => DropdownItemText
selectedIndexnumber-1
type"default" | "inline""default"
size"sm" | "lg" | "xl"-
openbooleanfalse
inlinebooleanfalse
lightbooleanfalse
disabledbooleanfalse
titleTextstring""
invalidbooleanfalse
invalidTextstring""
helperTextstring""
labelstring-
translateWithId(id: any) => string-
idstring-
namestring-
refnull | HTMLButtonElementnull

FileUploaderSkeleton

Usage

Component Group: FileUploader

Import Path

import { FileUploaderSkeleton } from "carbon-components-svelte";

API

No exported props.


FileUploader

Usage

Component Group: FileUploader

Import Path

import { FileUploader } from "carbon-components-svelte";

API

Prop nameTypeDefault
status"uploading" | "edit" | "complete""uploading"
acceptstring[][]
filesstring[][]
multiplebooleanfalse
clearFiles() => any() => void
labelDescriptionstring""
labelTitlestring""
kind"primary" | "secondary" | "tertiary" | "ghost" | "danger""primary"
buttonLabelstring""
iconDescriptionstring""
namestring-

FileUploaderButton

Usage

Component Group: FileUploader

Import Path

import { FileUploaderButton } from "carbon-components-svelte";

API

Prop nameTypeDefault
acceptstring[][]
multiplebooleanfalse
disabledbooleanfalse
disableLabelChangesbooleanfalse
kind"primary" | "secondary" | "tertiary" | "ghost" | "danger""primary"
labelTextstring"Add file"
rolestring"button"
tabindexstring"0"
idstring-
namestring-
refnull | HTMLInputElementnull

FileUploaderDropContainer

Usage

Component Group: FileUploader

Import Path

import { FileUploaderDropContainer } from "carbon-components-svelte";

API

Prop nameTypeDefault
acceptstring[][]
multiplebooleanfalse
validateFiles(files: Files) => Files(files: Files) => Files
labelTextstring"Add file"
rolestring"button"
disabledbooleanfalse
tabindexstring"0"
idstring-
namestring""
refnull | HTMLInputElementnull

FileUploaderItem

Usage

Component Group: FileUploader

Import Path

import { FileUploaderItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
status"uploading" | "edit" | "complete""uploading"
iconDescriptionstring""
invalidbooleanfalse
errorSubjectstring""
errorBodystring""
idstring-
namestring""

Filename

Usage

Component Group: FileUploader

Import Path

import { Filename } from "carbon-components-svelte";

API

Prop nameTypeDefault
status"uploading" | "edit" | "complete""uploading"
iconDescriptionstring""
invalidbooleanfalse

Form

Usage

Component Group: Form

Import Path

import { Form } from "carbon-components-svelte";

API

No exported props.


FormGroup

Usage

Component Group: FormGroup

Import Path

import { FormGroup } from "carbon-components-svelte";

API

Prop nameTypeDefault
invalidbooleanfalse

FormItem

Usage

Component Group: FormItem

Import Path

import { FormItem } from "carbon-components-svelte";

API

No exported props.


FormLabel

Usage

Component Group: FormLabel

Import Path

import { FormLabel } from "carbon-components-svelte";

API

Prop nameTypeDefault
idstring-

Column

Usage

Component Group: Grid

Import Path

import { Column } from "carbon-components-svelte";

API

Prop nameTypeDefault
asbooleanfalse
noGutterbooleanfalse
noGutterLeftbooleanfalse
noGutterRightbooleanfalse
aspectRatio"2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1"-
smColumnBreakpoint-
mdColumnBreakpoint-
lgColumnBreakpoint-
xlgColumnBreakpoint-
maxColumnBreakpoint-

Grid

Usage

Component Group: Grid

Import Path

import { Grid } from "carbon-components-svelte";

API

Prop nameTypeDefault
asbooleanfalse
condensedbooleanfalse
narrowbooleanfalse
fullWidthbooleanfalse
noGutterbooleanfalse
noGutterLeftbooleanfalse
noGutterRightbooleanfalse

Row

Usage

Component Group: Grid

Import Path

import { Row } from "carbon-components-svelte";

API

Prop nameTypeDefault
asbooleanfalse
condensedbooleanfalse
narrowbooleanfalse
noGutterbooleanfalse
noGutterLeftbooleanfalse
noGutterRightbooleanfalse

IconSkeleton

Usage

Component Group: Icon

Import Path

import { IconSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
sizenumber16

Icon

Usage

Component Group: Icon

Import Path

import { Icon } from "carbon-components-svelte";

API

Prop nameTypeDefault
rendertypeof import("carbon-icons-svelte/lib/Add16").default-
skeletonbooleanfalse

InlineLoading

Usage

Component Group: InlineLoading

Import Path

import { InlineLoading } from "carbon-components-svelte";

API

Prop nameTypeDefault
status"active" | "inactive" | "finished" | "error""active"
descriptionstring-
iconDescriptionstring"Expand/Collapse"
successDelaynumber1500

Usage

Component Group: Link

Import Path

import { Link } from "carbon-components-svelte";

API

Prop nameTypeDefault
inlinebooleanfalse
disabledbooleanfalse
refnull | HTMLAnchorElement | HTMLParagraphElementnull

ListBox

Usage

Component Group: ListBox

Import Path

import { ListBox } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"sm" | "xl"-
type"default" | "inline""default"
openbooleanfalse
lightbooleanfalse
disablebooleanfalse
invalidbooleanfalse
invalidTextstring""

ListBoxField

Usage

Component Group: ListBox

Import Path

import { ListBoxField } from "carbon-components-svelte";

API

Prop nameTypeDefault
disabledbooleanfalse
rolestring"combobox"
tabindexstring"-1"
translateWithId(id: ListBoxFieldTranslationId) => string(id) => string
idstring-
refnull | HTMLElementnull

ListBoxMenu

Usage

Component Group: ListBox

Import Path

import { ListBoxMenu } from "carbon-components-svelte";

API

Prop nameTypeDefault
idstring-

ListBoxMenuIcon

Usage

Component Group: ListBox

Import Path

import { ListBoxMenuIcon } from "carbon-components-svelte";

API

Prop nameTypeDefault
openbooleanfalse
translateWithId(id: ListBoxMenuIconTranslationId) => string(id) => string

ListBoxMenuItem

Usage

Component Group: ListBox

Import Path

import { ListBoxMenuItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
activebooleanfalse
highlightedbooleanfalse

ListBoxSelection

Usage

Component Group: ListBox

Import Path

import { ListBoxSelection } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectionCountany-
disabledbooleanfalse
translateWithId(id: ListBoxSelectionTranslationId) => string(id) => string
refnull | HTMLElementnull

ListItem

Usage

Component Group: ListItem

Import Path

import { ListItem } from "carbon-components-svelte";

API

No exported props.


Loading

Usage

Component Group: Loading

Import Path

import { Loading } from "carbon-components-svelte";

API

Prop nameTypeDefault
smallbooleanfalse
activebooleantrue
withOverlaybooleanfalse
descriptionstring"Active loading indicator"
idstring-

Modal

Usage

Component Group: Modal

Import Path

import { Modal } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"xs" | "sm" | "lg"-
openbooleanfalse
dangerbooleanfalse
passiveModalbooleanfalse
modalHeadingstring-
modalLabelstring-
modalAriaLabelstring-
iconDescriptionstring"Close the modal"
hasFormbooleanfalse
hasScrollingContentbooleanfalse
primaryButtonTextstring""
primaryButtonDisabledbooleanfalse
shouldSubmitOnEnterbooleantrue
secondaryButtonTextstring""
selectorPrimaryFocusstring"[data-modal-primary-focus]"
idstring-
refnull | HTMLElementnull

MultiSelect

Usage

Component Group: MultiSelect

Import Path

import { MultiSelect } from "carbon-components-svelte";

API

Prop nameTypeDefault
itemsMultiSelectItem[][]
itemToString(item: MultiSelectItem) => string(item: MultiSelectItem) => MultiSelectItemText
selectedIdsMultiSelectItemId[][]
valuestring""
size"sm" | "lg" | "xl"-
type"default" | "inline""default"
selectionFeedback"top" | "fixed" | "top-after-reopen""top-after-reopen"
disabledbooleanfalse
filterablebooleanfalse
filterItem(item: MultiSelectItem, value: string) => string(item: MultiSelectItem, value: string) => string
openbooleanfalse
lightbooleanfalse
localestring"en"
placeholderstring""
sortItem(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem
translateWithId(id: any) => string-
titleTextstring""
useTitleInItembooleanfalse
invalidbooleanfalse
invalidTextstring""
helperTextstring""
labelstring-
idstring-
namestring-

InlineNotification

Usage

Component Group: Notification

Import Path

import { InlineNotification } from "carbon-components-svelte";

API

Prop nameTypeDefault
notificationType"toast" | "inline""toast"
kind"error" | "info" | "info-square" | "success" | "warning" | "warning-alt""error"
lowContrastbooleanfalse
rolestring"alert"
titlestring"Title"
subtitlestring""
hideCloseButtonbooleanfalse
iconDescriptionstring"Closes notification"

NotificationActionButton

Usage

Component Group: Notification

Import Path

import { NotificationActionButton } from "carbon-components-svelte";

API

No exported props.


NotificationButton

Usage

Component Group: Notification

Import Path

import { NotificationButton } from "carbon-components-svelte";

API

Prop nameTypeDefault
notificationType"toast" | "inline""toast"
renderIcontypeof import("carbon-icons-svelte/lib/Add16").default-
iconDescriptionstring"Close icon"

NotificationIcon

Usage

Component Group: Notification

Import Path

import { NotificationIcon } from "carbon-components-svelte";

API

Prop nameTypeDefault
kind"error" | "info" | "info-square" | "success" | "warning" | "warning-alt""error"
notificationType"toast" | "inline""toast"
iconDescriptionstring"Closes notification"

NotificationTextDetails

Usage

Component Group: Notification

Import Path

import { NotificationTextDetails } from "carbon-components-svelte";

API

Prop nameTypeDefault
notificationType"toast" | "inline""toast"
titlestring"Title"
subtitlestring""
captionstring"Caption"

ToastNotification

Usage

Component Group: Notification

Import Path

import { ToastNotification } from "carbon-components-svelte";

API

Prop nameTypeDefault
notificationType"toast" | "inline""toast"
kind"error" | "info" | "info-square" | "success" | "warning" | "warning-alt""error"
lowContrastbooleanfalse
timeoutnumber0
rolestring"alert"
titlestring"Title"
subtitlestring""
captionstring"Caption"
iconDescriptionstring"Closes notification"
hideCloseButtonbooleanfalse

NumberInputSkeleton

Usage

Component Group: NumberInput

Import Path

import { NumberInputSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hideLabelbooleanfalse

NumberInput

Usage

Component Group: NumberInput

Import Path

import { NumberInput } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"sm" | "xl"-
valuestring""
stepnumber1
maxnumber-
minnumber-
lightbooleanfalse
readonlybooleanfalse
mobilebooleanfalse
allowEmptybooleanfalse
disabledbooleanfalse
iconDescriptionstring""
invalidbooleanfalse
invalidTextstring"Provide invalidText"
helperTextstring""
labelstring""
hideLabelbooleanfalse
translateWithId(id: NumberInputTranslationId) => string(id: NumberInputTranslationId) => string
idstring-
namestring-
refnull | HTMLInputElementnull

OrderedList

Usage

Component Group: OrderedList

Import Path

import { OrderedList } from "carbon-components-svelte";

API

Prop nameTypeDefault
nestedbooleanfalse

OverflowMenu

Usage

Component Group: OverflowMenu

Import Path

import { OverflowMenu } from "carbon-components-svelte";

API

Prop nameTypeDefault
direction"top" | "bottom""bottom"
openbooleanfalse
lightbooleanfalse
flippedbooleanfalse
menuOptionsClassstring-
icontypeof import("carbon-icons-svelte/lib/Add16").default-
iconClassstring-
iconDescriptionstring"Open and close list of options"
idstring-

OverflowMenuItem

Usage

Component Group: OverflowMenu

Import Path

import { OverflowMenuItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
textstring"Provide text"
hrefstring""
primaryFocusbooleanfalse
disabledbooleanfalse
hasDividerbooleanfalse
dangerbooleanfalse
requireTitlebooleanfalse
idstring-
refnull | HTMLAnchorElement | HTMLButtonElementnull

PaginationSkeleton

Usage

Component Group: Pagination

Import Path

import { PaginationSkeleton } from "carbon-components-svelte";

API

No exported props.


Pagination

Usage

Component Group: Pagination

Import Path

import { Pagination } from "carbon-components-svelte";

API

Prop nameTypeDefault
pagenumber1
totalnumber0
disabledbooleanfalse
forwardTextstring"Next page"
backwardTextstring"Previous page"
itemsPerPageTextstring"Items per page:"
itemText(min: number, max: number) => string(min: number, max: number) => string
itemRangeText(min: number, max: number, total: number) => string(min: number, max: number, total: number) => string
pageInputDisabledbooleanfalse
pageSizenumber10
pageSizesnumber[][10]
pagesUnknownbooleanfalse
pageText(page: number) => string(current: number) => string
pageRangeText(current: number, total: number) => string(current: number, total: number) => string
idstring-

PaginationItem

Usage

Component Group: PaginationNav

Import Path

import { PaginationItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
pagenumber0
activebooleanfalse

PaginationNav

Usage

Component Group: PaginationNav

Import Path

import { PaginationNav } from "carbon-components-svelte";

API

Prop nameTypeDefault
pagenumber0
totalnumber10
shownnumber10
loopbooleanfalse
forwardTextstring"Next page"
backwardTextstring"Next page"

PaginationOverflow

Usage

Component Group: PaginationNav

Import Path

import { PaginationOverflow } from "carbon-components-svelte";

API

Prop nameTypeDefault
fromIndexnumber0
countnumber0

ProgressIndicatorSkeleton

Usage

Component Group: ProgressIndicator

Import Path

import { ProgressIndicatorSkeleton } from "carbon-components-svelte";

API

No exported props.


ProgressIndicator

Usage

Component Group: ProgressIndicator

Import Path

import { ProgressIndicator } from "carbon-components-svelte";

API

Prop nameTypeDefault
currentIndexnumber0

ProgressStep

Usage

Component Group: ProgressIndicator

Import Path

import { ProgressStep } from "carbon-components-svelte";

API

Prop nameTypeDefault
completebooleanfalse
currentbooleanfalse
disabledbooleanfalse
invalidbooleanfalse
descriptonstring""
labelstring""
secondaryLabelstring""
idstring-

RadioButtonSkeleton

Usage

Component Group: RadioButton

Import Path

import { RadioButtonSkeleton } from "carbon-components-svelte";

API

No exported props.


RadioButton

Usage

Component Group: RadioButton

Import Path

import { RadioButton } from "carbon-components-svelte";

API

Prop nameTypeDefault
valuestring""
checkedbooleanfalse
disabledbooleanfalse
labelPosition"right" | "left""right"
labelTextstring""
hideLabelbooleanfalse
idstring-
namestring""
refnull | HTMLInputElementnull

RadioButtonGroup

Usage

Component Group: RadioButtonGroup

Import Path

import { RadioButtonGroup } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedstring-
disabledbooleanfalse
labelPosition"right" | "left""right"
orientation"horizontal" | "vertical""horizontal"

SearchSkeleton

Usage

Component Group: Search

Import Path

import { SearchSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
smallbooleanfalse

Usage

Component Group: Search

Import Path

import { Search } from "carbon-components-svelte";

API

Prop nameTypeDefault
smallbooleanfalse
size"sm" | "lg"-
skeletonbooleanfalse
lightbooleanfalse
valuestring"text"
typestring"text"
placeholderstring"Search..."
autocomplete"on" | "off""off"
autofocusbooleanfalse
closeButtonLabelTextstring"Clear search input"
labelTextstring""
idstring-
refnull | HTMLInputElementnull

SelectSkeleton

Usage

Component Group: Select

Import Path

import { SelectSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hideLabelbooleanfalse

Select

Usage

Component Group: Select

Import Path

import { Select } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedstring-
size"sm" | "xl"-
inlinebooleanfalse
lightbooleanfalse
disabledbooleanfalse
idstring-
namestring-
invalidbooleanfalse
invalidTextstring""
helperTextstring""
noLabelbooleanfalse
labelTextstring""
hideLabelbooleanfalse
refnull | HTMLSelectElementnull

SelectItem

Usage

Component Group: Select

Import Path

import { SelectItem } from "carbon-components-svelte";

API

No exported props.


SelectItemGroup

Usage

Component Group: Select

Import Path

import { SelectItemGroup } from "carbon-components-svelte";

API

Prop nameTypeDefault
disabledbooleanfalse
labelstring"Provide label"

SkeletonPlaceholder

Usage

Component Group: SkeletonPlaceholder

Import Path

import { SkeletonPlaceholder } from "carbon-components-svelte";

API

No exported props.


SkeletonText

Usage

Component Group: SkeletonText

Import Path

import { SkeletonText } from "carbon-components-svelte";

API

Prop nameTypeDefault
linesnumber3
headingbooleanfalse
paragraphbooleanfalse
widthstring"100%"

SliderSkeleton

Usage

Component Group: Slider

Import Path

import { SliderSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hideLabelbooleanfalse

Slider

Usage

Component Group: Slider

Import Path

import { Slider } from "carbon-components-svelte";

API

Prop nameTypeDefault
idstring-
invalidbooleanfalse
labelTextstring""
lightbooleanfalse
namestring""
refnull | HTMLElementnull

StructuredListSkeleton

Usage

Component Group: StructuredList

Import Path

import { StructuredListSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
rowsnumber5
borderbooleanfalse

StructuredList

Usage

Component Group: StructuredList

Import Path

import { StructuredList } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedstring-
borderbooleanfalse
selectionbooleanfalse

StructuredListBody

Usage

Component Group: StructuredList

Import Path

import { StructuredListBody } from "carbon-components-svelte";

API

No exported props.


StructuredListCell

Usage

Component Group: StructuredList

Import Path

import { StructuredListCell } from "carbon-components-svelte";

API

Prop nameTypeDefault
headbooleanfalse
noWrapbooleanfalse

StructuredListHead

Usage

Component Group: StructuredList

Import Path

import { StructuredListHead } from "carbon-components-svelte";

API

No exported props.


StructuredListInput

Usage

Component Group: StructuredList

Import Path

import { StructuredListInput } from "carbon-components-svelte";

API

Prop nameTypeDefault
checkedbooleanfalse
titlestring"title"
valuestring"value"
idstring-
namestring""
refnull | HTMLInputElementnull

StructuredListRow

Usage

Component Group: StructuredList

Import Path

import { StructuredListRow } from "carbon-components-svelte";

API

Prop nameTypeDefault
headbooleanfalse
labelbooleanfalse
tabindexstring"0"

Tab

Usage

Component Group: Tabs

Import Path

import { Tab } from "carbon-components-svelte";

API

Prop nameTypeDefault
labelstring""
hrefstring"#"
disabledbooleanfalse
tabindexstring"0"
idstring-
refnull | HTMLAnchorElementnull

TabContent

Usage

Component Group: Tabs

Import Path

import { TabContent } from "carbon-components-svelte";

API

Prop nameTypeDefault
idstring-

Tabs

Usage

Component Group: Tabs

Import Path

import { Tabs } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectednumber0
type"default" | "container""default"
iconDescriptionstring"Expand/Collapse"
triggerHrefstring"#"

TabsSkeleton

Usage

Component Group: Tabs

Import Path

import { TabsSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
countnumber4

TagSkeleton

Usage

Component Group: Tag

Import Path

import { TagSkeleton } from "carbon-components-svelte";

API

No exported props.


Tag

Usage

Component Group: Tag

Import Path

import { Tag } from "carbon-components-svelte";

API

Prop nameTypeDefault
type"red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast"-
filterbooleanfalse
disabledbooleanfalse
skeletonbooleanfalse
titlestring"Clear filter"
idstring-

TextAreaSkeleton

Usage

Component Group: TextArea

Import Path

import { TextAreaSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hideLabelbooleanfalse

TextArea

Usage

Component Group: TextArea

Import Path

import { TextArea } from "carbon-components-svelte";

API

Prop nameTypeDefault
valuestring""
placeholderstring""
colsnumber50
rowsnumber4
lightbooleanfalse
disabledbooleanfalse
helperTextstring""
labelTextstring""
hideLabelbooleanfalse
invalidbooleanfalse
invalidTextstring""
idstring-
namestring-
refnull | HTMLTextAreaElementnull

PasswordInput

Usage

Component Group: TextInput

Import Path

import { PasswordInput } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"sm" | "xl"-
valuestring""
typestring"password"
placeholderstring""
hidePasswordLabelstring"Hide password"
showPasswordLabelstring"Show password"
tooltipAlignment"start" | "center" | "end""center"
tooltipPosition"top" | "right" | "bottom" | "left""bottom"
lightbooleanfalse
disabledbooleanfalse
helperTextstring""
labelTextstring""
hideLabelbooleanfalse
invalidbooleanfalse
invalidTextstring""
idstring-
namestring-
refnull | HTMLInputElementnull

TextInputSkeleton

Usage

Component Group: TextInput

Import Path

import { TextInputSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
hideLabelbooleanfalse

TextInput

Usage

Component Group: TextInput

Import Path

import { TextInput } from "carbon-components-svelte";

API

Prop nameTypeDefault
size"sm" | "xl"-
valuestring""
typestring""
placeholderstring""
lightbooleanfalse
disabledbooleanfalse
helperTextstring""
idstring-
namestring-
labelTextstring""
hideLabelbooleanfalse
invalidbooleanfalse
invalidTextstring""
refnull | HTMLInputElementnull

ClickableTile

Usage

Component Group: Tile

Import Path

import { ClickableTile } from "carbon-components-svelte";

API

Prop nameTypeDefault
clickedbooleanfalse
lightbooleanfalse

ExpandableTile

Usage

Component Group: Tile

Import Path

import { ExpandableTile } from "carbon-components-svelte";

API

Prop nameTypeDefault
expandedbooleanfalse
lightbooleanfalse
tileMaxHeightnumber0
tilePaddingnumber0
tileCollapsedIconTextstring"Interact to expand Tile"
tileExpandedIconTextstring"Interact to collapse Tile"
tabindexstring"0"
idstring-
refnull | HTMLElementnull

RadioTile

Usage

Component Group: Tile

Import Path

import { RadioTile } from "carbon-components-svelte";

API

Prop nameTypeDefault
checkedbooleanfalse
lightbooleanfalse
valuestring""
tabindexstring"0"
iconDescriptionstring"Tile checkmark"
idstring-
namestring""

SelectableTile

Usage

Component Group: Tile

Import Path

import { SelectableTile } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedbooleanfalse
lightbooleanfalse
titlestring"title"
valuestring"value"
tabindexstring"0"
iconDescriptionstring"Tile checkmark"
idstring-
namestring""
refnull | HTMLInputElementnull

Tile

Usage

Component Group: Tile

Import Path

import { Tile } from "carbon-components-svelte";

API

Prop nameTypeDefault
lightbooleanfalse

TileGroup

Usage

Component Group: Tile

Import Path

import { TileGroup } from "carbon-components-svelte";

API

Prop nameTypeDefault
selectedstring-
disabledbooleanfalse
legendstring-

TimePicker

Usage

Component Group: TimePicker

Import Path

import { TimePicker } from "carbon-components-svelte";

API

Prop nameTypeDefault
valuestring""
typestring"text"
placeholderstring"hh=mm"
patternstring"(1[012]
maxLengthnumber5
lightbooleanfalse
disabledbooleanfalse
labelTextstring""
hideLabelbooleanfalse
invalidbooleanfalse
invalidTextstring"Invalid time format."
idstring-
namestring-
refnull | HTMLInputElementnull

TimePickerSelect

Usage

Component Group: TimePicker

Import Path

import { TimePickerSelect } from "carbon-components-svelte";

API

Prop nameTypeDefault
valuestring""
disabledbooleanfalse
iconDescriptionstring"Expand/Collapse"
labelTextstring""
hideLabelbooleanfalse
idstring-
namestring-
refnull | HTMLSelectElementnull

ToggleSkeleton

Usage

Component Group: Toggle

Import Path

import { ToggleSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
labelTextstring""
idstring-

Toggle

Usage

Component Group: Toggle

Import Path

import { Toggle } from "carbon-components-svelte";

API

Prop nameTypeDefault
toggledbooleanfalse
disabledbooleanfalse
labelAstring"Off"
labelBstring"On"
labelTextstring""
idstring-
namestring-

ToggleSmallSkeleton

Usage

Component Group: ToggleSmall

Import Path

import { ToggleSmallSkeleton } from "carbon-components-svelte";

API

Prop nameTypeDefault
labelTextstring""
idstring-

ToggleSmall

Usage

Component Group: ToggleSmall

Import Path

import { ToggleSmall } from "carbon-components-svelte";

API

Prop nameTypeDefault
toggledbooleanfalse
disabledbooleanfalse
labelAstring"Off"
labelBstring"On"
labelTextstring""
idstring-
namestring-

Tooltip

Usage

Component Group: Tooltip

Import Path

import { Tooltip } from "carbon-components-svelte";

API

Prop nameTypeDefault
direction"top" | "right" | "bottom" | "left""bottom"
openbooleanfalse
hideIconbooleanfalse
icontypeof import("carbon-icons-svelte/lib/Add16").defaultInformation16
iconDescriptionstring""
iconNamestring""
tabindexstring"0"
tooltipIdstring-
triggerIdstring-
triggerTextstring""
refnull | HTMLElementnull

TooltipDefinition

Usage

Component Group: TooltipDefinition

Import Path

import { TooltipDefinition } from "carbon-components-svelte";

API

Prop nameTypeDefault
tooltipTextstring""
align"start" | "center" | "end""center"
direction"top" | "bottom""bottom"
idstring-
refnull | HTMLButtonElementnull

TooltipIcon

Usage

Component Group: TooltipIcon

Import Path

import { TooltipIcon } from "carbon-components-svelte";

API

Prop nameTypeDefault
tooltipTextstring""
align"start" | "center" | "end""center"
direction"top" | "right" | "bottom" | "left""bottom"
idstring-
refnull | HTMLButtonElementnull

Content

Usage

Component Group: UIShell

Import Path

import { Content } from "carbon-components-svelte";

API

Prop nameTypeDefault
idstring"main-content"

SkipToContent

Usage

Component Group: UIShell

Import Path

import { SkipToContent } from "carbon-components-svelte";

API

Prop nameTypeDefault
hrefstring"#main-content"
tabindexstring"0"

UnorderedList

Usage

Component Group: UnorderedList

Import Path

import { UnorderedList } from "carbon-components-svelte";

API

Prop nameTypeDefault
nestedbooleanfalse

Header

Usage

Component Group: UIShell

Import Path

import { Header } from "carbon-components-svelte";

API

Prop nameTypeDefault
isSideNavOpenbooleanfalse
uiShellAriaLabelstring-
hrefstring-
companystring-
platformNamestring-

HeaderAction

Usage

Component Group: UIShell

Import Path

import { HeaderAction } from "carbon-components-svelte";

API

Prop nameTypeDefault
isOpenbooleanfalse
icon{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }-
textstring-
refnull | HTMLButtonElementnull

Usage

Component Group: UIShell

Import Path

import { HeaderActionLink } from "carbon-components-svelte";

API

Prop nameTypeDefault
linkIsActivebooleanfalse
hrefstring-
icon{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }-

HeaderActionSearch

Usage

Component Group: UIShell

Import Path

import { HeaderActionSearch } from "carbon-components-svelte";

API

Prop nameTypeDefault
searchIsActivebooleanfalse

HeaderNav

Usage

Component Group: UIShell

Import Path

import { HeaderNav } from "carbon-components-svelte";

API

Prop nameTypeDefault
ariaLabelstring-

HeaderNavItem

Usage

Component Group: UIShell

Import Path

import { HeaderNavItem } from "carbon-components-svelte";

API

Prop nameTypeDefault
hrefstring-
textstring-

HeaderNavMenu

Usage

Component Group: UIShell

Import Path

import { HeaderNavMenu } from "carbon-components-svelte";

API

Prop nameTypeDefault
expandedbooleanfalse
hrefstring"/"
textstring-
iconDescriptionstring"Expand/Collapse"

HeaderPanelDivider

Usage

Component Group: UIShell

Import Path

import { HeaderPanelDivider } from "carbon-components-svelte";

API

No exported props.


Usage

Component Group: UIShell

Import Path

import { HeaderPanelLink } from "carbon-components-svelte";

API

Prop nameTypeDefault
hrefstring-

Usage

Component Group: UIShell

Import Path

import { HeaderPanelLinks } from "carbon-components-svelte";

API

No exported props.


HeaderUtilities

Usage

Component Group: UIShell

Import Path

import { HeaderUtilities } from "carbon-components-svelte";

API

No exported props.


HamburgerMenu

Usage

Component Group: UIShell

Import Path

import { HamburgerMenu } from "carbon-components-svelte";

API

Prop nameTypeDefault
ariaLabelstring-
isOpenbooleanfalse

SideNav

Usage

Component Group: UIShell

Import Path

import { SideNav } from "carbon-components-svelte";

API

Prop nameTypeDefault
ariaLabelstring-
isOpenbooleanfalse

SideNavItems

Usage

Component Group: UIShell

Import Path

import { SideNavItems } from "carbon-components-svelte";

API

No exported props.


Usage

Component Group: UIShell

Import Path

import { SideNavLink } from "carbon-components-svelte";

API

Prop nameTypeDefault
isSelectedbooleanfalse
hrefstring-
textstring-
icon{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }-

SideNavMenu

Usage

Component Group: UIShell

Import Path

import { SideNavMenu } from "carbon-components-svelte";

API

Prop nameTypeDefault
expandedboolean-
textstring-
icon{ render: typeof import("carbon-icons-svelte/lib/Add16").default; skeleton: boolean; }-

SideNavMenuItem

Usage

Component Group: UIShell

Import Path

import { SideNavMenuItem } from "carbon-components-svelte";

API

No exported props.


Contributing

Refer to the Contributing guidelines.

Changelog

License

Apache 2.0

Keywords

FAQs

Package last updated on 12 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc