Floating UI Svelte
Please note this section will be the future home of the Floating UI Svelte integrateion guide, an upcoming open-source library from Skeleton Labs. While this project is in development, we have provided several Svelte-specific components to act as temporary substitutions. Note that these components will remain available until our next major release (Skeleton v4.x). However, the goal will be to replace these with Floating UI Svelte as soon as possible.
Z-Index
Skeleton does not take an opinionated stance regarding z-index stacking. This means elements may be occluded beneath other elements with a higher index. Adjust this using the zIndex component property.
<Popover ... zIndex={10}> <!-- ... --></Popover>Popover
Triggers an anchored popover when you click the trigger element. View API Reference.
Anatomy
<Popover> trigger positioner arrow content API Reference
Popover
| Property | Type | Description |
|---|---|---|
arrow | boolean | |
zIndex | string | |
base | string | |
classes | string | |
triggerBase | string | |
triggerBackground | string | |
triggerClasses | string | |
triggerAriaLabel | string | |
positionerBase | string | |
positionerClasses | string | |
contentBase | string | |
contentBackground | string | |
contentClasses | string | |
arrowBase | string | |
arrowBackground | string | |
arrowClasses | string | |
trigger | Snippet<[]> | |
content | Snippet<[]> | |
onclick | () => void | |
ids | Partial<{ anchor: string; trigger: string; content: string; title: string; description: string; closeTrigger: string; positioner: string; arrow: string; }> | |
dir | "ltr" | "rtl" | |
getRootNode | () => ShadowRoot | Node | Document | |
autoFocus | boolean | |
onPointerDownOutside | (event: PointerDownOutsideEvent) => void | |
onFocusOutside | (event: FocusOutsideEvent) => void | |
onInteractOutside | (event: InteractOutsideEvent) => void | |
open | boolean | |
defaultOpen | boolean | |
positioning | PositioningOptions | |
onOpenChange | (details: OpenChangeDetails) => void | |
modal | boolean | |
initialFocusEl | () => HTMLElement | |
closeOnInteractOutside | boolean | |
closeOnEscape | boolean | |
onEscapeKeyDown | (event: KeyboardEvent) => void | |
persistentElements | (() => Element)[] | |
portalled | boolean | |
Tooltip
Triggers an anchored popover when you hover the trigger element. View API Reference.
Anatomy
<Tooltip> trigger positioner arrow content API Reference
Tooltip
| Property | Type | Description |
|---|---|---|
arrow | boolean | |
zIndex | string | |
base | string | |
classes | string | |
triggerBase | string | |
triggerBackground | string | |
triggerClasses | string | |
triggerAriaLabel | string | |
positionerBase | string | |
positionerClasses | string | |
contentBase | string | |
contentBackground | string | |
contentClasses | string | |
arrowBase | string | |
arrowBackground | string | |
arrowClasses | string | |
trigger | Snippet<[]> | |
content | Snippet<[]> | |
onmouseover | () => void | |
onclick | () => void | |
ids | Partial<{ trigger: string; content: string; arrow: string; positioner: string; }> | |
disabled | boolean | |
dir | "ltr" | "rtl" | |
getRootNode | () => ShadowRoot | Node | Document | |
aria-label | string | |
open | boolean | |
defaultOpen | boolean | |
positioning | PositioningOptions | |
onOpenChange | (details: OpenChangeDetails) => void | |
closeOnEscape | boolean | |
openDelay | number | |
closeDelay | number | |
closeOnPointerDown | boolean | |
closeOnScroll | boolean | |
closeOnClick | boolean | |
interactive | boolean | |
Combobox
Triggers an anchored popover list when you tap the arrow. Includes auto-suggestion via typeahead. View API Reference.
Anatomy
<Combobox> label labelText inputGroup inputGroupInput inputGroupButton inputGroupArrow positioner content option API Reference
Combobox
| Property | Type | Description |
|---|---|---|
data | T[] | |
label | string | |
zIndex | string | |
base | string | |
width | string | |
classes | string | |
labelBase | string | |
labelText | string | |
labelClasses | string | |
inputGroupBase | string | |
inputGroupInput | string | |
inputGroupButton | string | |
inputGroupArrow | string | |
inputGroupClasses | string | |
positionerBase | string | |
positionerClasses | string | |
contentBase | string | |
contentBackground | string | |
contentSpaceY | string | |
contentClasses | string | |
optionBase | string | |
optionFocus | string | |
optionHover | string | |
optionActive | string | |
optionClasses | string | |
arrow | Snippet<[]> | |
item | Snippet<[T]> | |
onclick | (event: Event) => void | |
ids | Partial<{ root: string; label: string; control: string; input: string; content: string; trigger: string; clearTrigger: string; item(id: string, index?: number): string; positioner: string; itemGroup(id: string | number): string; itemGroupLabel(id: string | number): string; }> | |
multiple | boolean | |
value | string[] | |
defaultValue | string[] | |
disabled | boolean | |
onValueChange | (details: ValueChangeDetails<any>) => void | |
dir | "ltr" | "rtl" | |
getRootNode | () => ShadowRoot | Node | Document | |
name | string | |
translations | IntlTranslations | |
required | boolean | |
invalid | boolean | |
form | string | |
readOnly | boolean | |
autoFocus | boolean | |
loopFocus | boolean | |
composite | boolean | |
navigate | (details: NavigateDetails) => void | |
inputValue | string | |
defaultInputValue | string | |
onInputValueChange | (details: InputValueChangeDetails) => void | |
onHighlightChange | (details: HighlightChangeDetails<any>) => void | |
onPointerDownOutside | (event: PointerDownOutsideEvent) => void | |
onFocusOutside | (event: FocusOutsideEvent) => void | |
onInteractOutside | (event: InteractOutsideEvent) => void | |
open | boolean | |
defaultOpen | boolean | |
placeholder | string | |
defaultHighlightedValue | string | |
highlightedValue | string | |
inputBehavior | "autohighlight" | "autocomplete" | "none" | |
selectionBehavior | "clear" | "replace" | "preserve" | |
openOnClick | boolean | |
openOnChange | boolean | ((details: InputValueChangeDetails) => boolean) | |
allowCustomValue | boolean | |
positioning | PositioningOptions | |
onOpenChange | (details: OpenChangeDetails) => void | |
closeOnSelect | boolean | |
openOnKeyPress | boolean | |
scrollToIndexFn | (details: ScrollToIndexDetails) => void | |
disableLayer | boolean | |
Modal
Generate modals or dialogs that require a user’s immediate attention. View API Reference.
Anatomy
<Modal> trigger backdrop positioner content API Reference
Modal
| Property | Type | Description |
|---|---|---|
base | string | |
classes | string | |
zIndex | string | |
triggerBase | string | |
triggerBackground | string | |
triggerClasses | string | |
triggerAriaLabel | string | |
backdropBase | string | |
backdropBackground | string | |
backdropClasses | string | |
positionerBase | string | |
positionerDisplay | string | |
positionerJustify | string | |
positionerAlign | string | |
positionerPadding | string | |
positionerClasses | string | |
contentBase | string | |
contentBackground | string | |
contentClasses | string | |
transitionsBackdropIn | FadeParams | |
transitionsBackdropOut | FadeParams | |
transitionsPositionerIn | FlyParams | |
transitionsPositionerOut | FlyParams | |
trigger | Snippet<[]> | |
content | Snippet<[]> | |
onclick | () => void | |
ids | Partial<{ trigger: string; positioner: string; backdrop: string; content: string; closeTrigger: string; title: string; description: string; }> | |
dir | "ltr" | "rtl" | |
getRootNode | () => ShadowRoot | Node | Document | |
aria-label | string | |
onPointerDownOutside | (event: PointerDownOutsideEvent) => void | |
onFocusOutside | (event: FocusOutsideEvent) => void | |
onInteractOutside | (event: InteractOutsideEvent) => void | |
open | boolean | |
defaultOpen | boolean | |
onOpenChange | (details: OpenChangeDetails) => void | |
trapFocus | boolean | |
preventScroll | boolean | |
modal | boolean | |
initialFocusEl | () => HTMLElement | |
finalFocusEl | () => HTMLElement | |
restoreFocus | boolean | |
closeOnInteractOutside | boolean | |
closeOnEscape | boolean | |
role | "dialog" | "alertdialog" | |
onEscapeKeyDown | (event: KeyboardEvent) => void | |
persistentElements | (() => Element)[] | |
Native Browser APIs
Skeleton will always favor native browser APIs over third-party libraries such as Floating UI Svelte. The following is a list of current and upcoming incoming APIs we will aim to support in the future, but are not quite standardized cross-browser yet.