Skip to content
Logo LogoCarbonKivy 0.0.6 documentation
⌘ K
Logo LogoCarbonKivy 0.0.6 documentation
  • Introduction
  • Carbon Design System
  • Contributing to CarbonKivy
  • Financial Support
  • Elements
    • Carbon Design App
    • Color
    • Themes
  • Components
    • Anchor Layout
    • Box Layout
    • Button
    • Checkbox
    • Date picker
    • Float Layout
    • Grid Layout
    • Icons
    • Label
    • Link
    • Loading
    • Modal
    • Notification
    • Radio button
    • Relative Layout
    • Screen
    • Screen Manager
    • Scroll View
    • UI Shell
    • Stack Layout
    • Text inputs
    • Toggle
    • Toggletip
    • Tooltip
  • Build Instructions
  • Development Tools
    • Hot Reloading
  • Development Utilities
  • API Reference
    • carbonkivy
      • carbonkivy.app
      • carbonkivy.behaviors
        • carbonkivy.behaviors.adaptive_behavior
        • carbonkivy.behaviors.background_color_behavior
        • carbonkivy.behaviors.declarative_behavior
        • carbonkivy.behaviors.elevation_behavior
        • carbonkivy.behaviors.hierarchical_layer_behavior
        • carbonkivy.behaviors.hover_behavior
        • carbonkivy.behaviors.selectable_behavior
        • carbonkivy.behaviors.selection_behavior
        • carbonkivy.behaviors.state_focus_behavior
        • carbonkivy.behaviors.tooltip_behavior
      • carbonkivy.config
      • carbonkivy.devtools
      • carbonkivy.effects
        • carbonkivy.effects.shimmer
      • carbonkivy.factory_registers
      • carbonkivy.theme
        • carbonkivy.theme.color_tokens
        • carbonkivy.theme.colors
        • carbonkivy.theme.icons
        • carbonkivy.theme.size_tokens
        • carbonkivy.theme.theme
      • carbonkivy.uix
        • carbonkivy.uix.anchorlayout
          • carbonkivy.uix.anchorlayout.anchorlayout
        • carbonkivy.uix.boxlayout
          • carbonkivy.uix.boxlayout.boxlayout
        • carbonkivy.uix.button
          • carbonkivy.uix.button.button
        • carbonkivy.uix.checkbox
          • carbonkivy.uix.checkbox.checkbox
        • carbonkivy.uix.codesnippet
          • carbonkivy.uix.codesnippet.codesnippet
        • carbonkivy.uix.datatable
          • carbonkivy.uix.datatable.datatable
        • carbonkivy.uix.datepicker
          • carbonkivy.uix.datepicker.datepicker
        • carbonkivy.uix.divider
          • carbonkivy.uix.divider.divider
        • carbonkivy.uix.dropdown
          • carbonkivy.uix.dropdown.dropdown
        • carbonkivy.uix.fileuploader
        • carbonkivy.uix.floatlayout
          • carbonkivy.uix.floatlayout.floatlayout
        • carbonkivy.uix.focuscontainer
          • carbonkivy.uix.focuscontainer.focuscontainer
        • carbonkivy.uix.gridlayout
          • carbonkivy.uix.gridlayout.gridlayout
        • carbonkivy.uix.icon
          • carbonkivy.uix.icon.icon
        • carbonkivy.uix.image
          • carbonkivy.uix.image.image
        • carbonkivy.uix.label
          • carbonkivy.uix.label.label
        • carbonkivy.uix.link
          • carbonkivy.uix.link.link
        • carbonkivy.uix.loading
          • carbonkivy.uix.loading.loading
        • carbonkivy.uix.modal
          • carbonkivy.uix.modal.modal
        • carbonkivy.uix.notification
          • carbonkivy.uix.notification.notification
        • carbonkivy.uix.radio
          • carbonkivy.uix.radio.radio
        • carbonkivy.uix.relativelayout
          • carbonkivy.uix.relativelayout.relativelayout
        • carbonkivy.uix.screen
          • carbonkivy.uix.screen.screen
        • carbonkivy.uix.screenmanager
          • carbonkivy.uix.screenmanager.screenmanager
        • carbonkivy.uix.scrollview
          • carbonkivy.uix.scrollview.scrollview
        • carbonkivy.uix.selectionlayout
          • carbonkivy.uix.selectionlayout.selectionlayout
        • carbonkivy.uix.shell
          • carbonkivy.uix.shell.shell
        • carbonkivy.uix.stacklayout
          • carbonkivy.uix.stacklayout.stacklayout
        • carbonkivy.uix.tab
          • carbonkivy.uix.tab.tab
        • carbonkivy.uix.textinput
          • carbonkivy.uix.textinput.textinput
        • carbonkivy.uix.toggle
          • carbonkivy.uix.toggle.toggle
        • carbonkivy.uix.toggletip
          • carbonkivy.uix.toggletip.toggletip
        • carbonkivy.uix.tooltip
          • carbonkivy.uix.tooltip.tooltip
      • carbonkivy.utils
CarbonKivy 0.0.6 documentation
/
Components
/
Modal

Modal

Modals focus the user’s attention exclusively on one task or piece of information by using a window that is displayed on top of the page content.

Overview

Carbon Design Modal

Carbon Design Modal Overview

Modals are a type of dialog because it is a conversation between the user and the system. Use a modal to present critical information or request user input that’s needed to complete a user’s workflow. Modals interrupt a user’s workflow for short and non-frequent tasks, such as editing or management tasks. When the modal is open, the user is blocked from the on-page content and can’t return to their previous workflow until the modal task is completed or the user dismisses the modal. While effective when used correctly, modals should be used sparingly to limit disrupting the user. Therefore, if a user needs to repeatably perform a task, consider making the task completable on the main page.

Live demo

Note

This live demo contains only a preview of functionality and styles available for this component. Actual widgets may not show the exact same behavior but similar to expected.

...

from carbonkivy.app import CarbonApp
from carbonkivy.uix.modal import CModal


class DomainModal(CModal):
    pass


class MyApp(CarbonApp) -> None:

    def __init__(self, *args, **kwargs) -> None:
        super(MyApp, self).__init__(*args, **kwargs)
        self.modal = DomainModal()

...
<DomainModal>:
    CModalLayout:

        CModalHeader:
            CModalHeaderLabel:
                text: "Account resources"
            CModalHeaderTitle:
                text: "Add a custom domain"

        CModalBody:
            CModalBodyContent:
                text: "Custom domains direct requests for your apps in this Cloud Foundry organization to a URL that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host."

            CBoxLayout:
                adaptive: [False, True]
                padding: [0, dp(64)]

                CTextInputLayout:
                    CTextInput:
                        hint_text: "e.g. bluemix.net"
                    CTextInputLabel:
                        text: "Domain name"

        CModalFooter:
            CGridLayout:
                cols: 2
                adaptive: [False, True]
                spacing: dp(1)

                CButtonSecondary:
                    text: "Cancel"
                    role: "Extra Large"
                    size_hint_x: 1

                CButtonPrimary:
                    text: "Add"
                    role: "Extra Large"
                    size_hint_x: 1

    CModalCloseButton:

Example

See also

Carbon Design Modal Example

API

class carbonkivy.uix.modal.modal.CModal(*args: Any, **kwargs: Any)[source]

Bases: AdaptiveBehavior, DeclarativeBehavior, ModalView

add_widget(widget: kivy.uix.widget.Widget, *args, **kwargs)[source]
remove_widget(widget, *args, **kwargs)[source]
class carbonkivy.uix.modal.modal.CModalBody(*args: Any, **kwargs: Any)[source]

Bases: CStackLayout

class carbonkivy.uix.modal.modal.CModalBodyContent(*args: Any, **kwargs: Any)[source]

Bases: CLabel

class carbonkivy.uix.modal.modal.CModalCloseButton(*args: Any, **kwargs: Any)[source]

Bases: UIShellButton

class carbonkivy.uix.modal.modal.CModalFooter(*args: Any, **kwargs: Any)[source]

Bases: CStackLayout

class carbonkivy.uix.modal.modal.CModalHeader(*args: Any, **kwargs: Any)[source]

Bases: CStackLayout

class carbonkivy.uix.modal.modal.CModalHeaderLabel(*args: Any, **kwargs: Any)[source]

Bases: CLabel

class carbonkivy.uix.modal.modal.CModalHeaderTitle(*args: Any, **kwargs: Any)[source]

Bases: CLabel

class carbonkivy.uix.modal.modal.CModalLayout(*args: Any, **kwargs: Any)[source]

Bases: CBoxLayout

Loading
Notification

On this page

  • Modal
    • Overview
    • Live demo
    • Example
    • API

© 2025-2026, "Kartavya Shukla" Built with Sphinx 9.1.0