Show your appreciation for Deephaven by starring us on GitHub.

  • Docs
  • Blog
  • ContactRequest Demo
Try Sandbox
Core EngineUI & DashboardsPlottingEnterprise
  • Introduction
  • Installation
  • Tutorial
  • Architecture
  • Describing the UI
    • Your First Component
    • Importing and Exporting Components
    • Component Rules
    • Using Hooks
    • UI with Tables
    • Conditional Rendering
    • Render Lists
    • Pure Components
    • Your UI as a Tree
    • Respond to Events
    • State: A Component's Memory
    • Render Cycle
    • State as a Snapshot
    • Update Dictionaries in State
    • action_button
    • action_group
    • action_menu
    • avatar
    • badge
    • breadcrumbs
    • button
    • button_group
    • calendar
    • checkbox
    • checkbox_group
    • combo_box
    • contextual_help
    • dashboard
    • date_field
    • date_picker
    • date_range_picker
    • dialog
    • dialog_trigger
    • disclosure
    • divider
    • flex
    • form
    • fragment
    • heading
    • icon
    • illustrated_message
    • image
    • inline_alert
    • labeled_value
    • link
    • list_view
    • logic_button
    • markdown
    • menu
    • menu_trigger
    • meter
    • number_field
    • panel
    • picker
    • progress_bar
    • progress_circle
    • radio_group
    • range_calendar
    • range_slider
    • search_field
    • slider
    • switch
    • table
    • tabs
    • tag_group
    • text
    • text_area
    • text_field
    • time_field
    • toast
    • toggle_button
    • view
    • Overview
    • use_boolean
    • use_callback
    • use_cell_data
    • use_column_data
    • use_effect
    • use_liveness_scope
    • use_memo
    • use_ref
    • use_render_queue
    • use_row_data
    • use_row_list
    • use_state
    • use_table_data
    • use_table_listener
  • Example
  • Events
  • Variants
  • Disabled state
  • Question? Give us feedback ↗
  • Edit this page on GitHub ↗
  • View as markdown
  • ↑ Back to top

Logic Button

A Logic Button shows an operator in a boolean logic sequence.

Example

Events

Logic buttons handles user interaction through the on_press prop.

Variants

Disabled state

Community Core

DocumentationCommunity questionsOpen-core LicensePydoc clientPydoc serverJavadoc client/serverGodoc clientC++ client

Enterprise

Enterprise SupportDocumentation

Social

BlogGithubSlackLinkedinYoutube

Company

AboutCareersNewsroomBrand AssetsContact

Copyright © 2026 Deephaven Data Labs LLC

Privacy PolicyTerms of Service
from deephaven import ui

my_logic_button_basic = ui.logic_button("Or", variant="or")
from deephaven import ui


@ui.component
def ui_toggle_logic_button():
    variant, set_variant = ui.use_state("or")

    return ui.logic_button(
        variant,
        variant=variant,
        on_press=lambda: set_variant("and" if variant == "or" else "or"),
    )


my_toggle_logic_button = ui_toggle_logic_button()
from deephaven import ui


@ui.component
def ui_logic_button_variants():

    return [
        ui.logic_button("Or", variant="or"),
        ui.logic_button("And", variant="and"),
    ]


my_logic_button_variants = ui_logic_button_variants()
from deephaven import ui

my_logic_button_disabled = ui.logic_button("Or", variant="or", is_disabled=True)