defaultActive Property

Defines the initial active state when the <ToggleButton> is first loaded.

The possible values are:

  • undefined
  • true
  • false

onActiveChange Property

Executes a JavaScript's callback function when the active state changed.

Client Side Link

Navigates between pages using JavaScript way, without causing a whole page HTTP request.

<ToggleButton> designed to work with <Link> component of React Router and Next JS (Gatsby JS and React Remix are coming soon).

When there is a <Link> component inside the <ToggleButton>, at render phase, the hierarchy of <ToggleButton> and <Link> is automatically swapped for you. Here the illustration:

Show code

href Property

Navigates to another pages or to external websites using traditional link.

onClick Property

Executes a JavaScript's callback function when the <ToggleButton> is clicked.

Variant Properties

The alternative appearances of the <ToggleButton> layout without changing the <ToggleButton>'s functionality.

buttonStyle Property

Sets the alternative appearances of the <ToggleButton>.

The possible values are:

  • undefined
  • 'regular'
  • 'link'
  • 'ghost'

Here the preview:

Preview

Show code

orientation Property

Sets the orientation of the <ToggleButton>.

The possible values are:

  • undefined
  • 'inline'
  • 'block'

Here the preview:

Preview

Show code

size Property

Defines the alternative size of the <ToggleButton>.

The possible values are:

  • undefined
  • 'sm'
  • 'md'
  • 'lg'

Here the preview:

Preview

Show code

theme Property

Defines the contextual theme of the <ToggleButton>.

The possible values are:

  • undefined
  • 'primary'
  • 'secondary'
  • 'success'
  • 'info'
  • 'warning'
  • 'danger'
  • 'light'
  • 'dark'

Here the preview:

Preview

Show code

gradient Property

Activates a 3D mode of the <ToggleButton>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

outlined Property

Activates an outlined mode (background-less, contrast foreground, and contrast border) of the <ToggleButton>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

mild Property

Activates a mild mode (mild background, contrast foreground, and contrast border) of the <ToggleButton>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

nude Property

Activates an nude mode (background-less, padding-less, and border-less) of the <ToggleButton>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

State Properties

The conditions of the <ToggleButton> behavior or functionality.

enabled Property

Defines the enabled/disabled state of the <ToggleButton>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

inheritEnabled Property

Influences the <ToggleButton>'s disabled state by <ancestor enabled={false}>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

Component Properties

Overwrites the internal (sub) components used as the composition of <ToggleButton> component.

buttonComponent Property

Overwrites the internal <Button> component used as the composition of <ToggleButton> component.

<ToggleButton buttonComponent={
    <MyCustomButton />
} />