Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SwitchOptions

A data type that represents the configuration options for a switch component.

Hierarchy

Index

Properties

Optional className

className: string

CSS class name to add to the view's element.

Optional closeIcon

closeIcon: boolean

A Boolean indicating whether a close icon should appear on hover when selected.

Optional controls

controls: {}

Optional configuration for additional controls rendered with the button, such as a close indicator on hover, settings popover, etc.

Type declaration

  • [key: string]: any

Optional group

group: string

Optional id

id: string

Identifier for the button. If not provided, the value will be used as the button's identifier.

Optional label

label: string

Optional loader

loader: boolean

Optional onDeselect

onDeselect: (button: AnyButton) => void

A custom handler function that is called when the button is deselected.

Type declaration

Optional onSelect

onSelect: (button: AnyButton) => void

A custom handler function that is called when the button is selected.

Type declaration

Optional options

options: {}

Optional data associated with the button.

Type declaration

  • [key: string]: any

Optional parent

parent: string

Optional renderer

renderer: Function | string

Renderer for the view, which can either be an HTML string or a function that receives the view's data, if any, and returns the final HTML string to render as the view's content.

Optional requiresData

requiresData: boolean

A Boolean value that indicates whether the view requires valid data to be provided in order for it to be rendered. When this value is true and there is no data provided, then the view will be rendered as empty.

Default value is false.

Optional selected

selected: boolean

A Boolean indicating whether the button should be selected.

title

title: string

Button label.

Optional toggleable

toggleable: boolean

Optional type

Optional ui

ui: {}

An object that defines the CSS selectors for various UI elements in the view and their reference keys. When a view has been rendered and added to the DOM, you can reference and access these UI targets using this.ui.#key#, where #key# is the key used with this object.

Type declaration

  • [key: string]: string

Optional value

value: any

Button value.

values

values: { label: string; value: string }[] | string[]

Generated using TypeDoc