Motion

Use motion to make a UI expressive and easy to use.

https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/motion.png

Added in version 1.2.0.

Classes of the Motion type implement the display behavior of widgets such as dialogs, dropdown menu, snack bars, and so on.

API - kivymd.uix.behaviors.motion_behavior

class kivymd.uix.behaviors.motion_behavior.MotionBase

Base class for widget display movement behavior.

show_transition

The type of transition of the widget opening.

show_transition is a StringProperty and defaults to ‘linear’.

show_duration

Duration of widget display transition.

show_duration is a NumericProperty and defaults to 0.2.

hide_transition

The type of transition of the widget closing.

hide_transition is a StringProperty and defaults to ‘linear’.

hide_duration

Duration of widget closing transition.

hide_duration is a NumericProperty and defaults to 0.2.

class kivymd.uix.behaviors.motion_behavior.MotionDropDownMenuBehavior(**kwargs)

Base class for the dropdown menu movement behavior.

For more information, see in the MotionBase class documentation.

show_transition

The type of transition of the widget opening.

show_transition is a StringProperty and defaults to ‘out_back’.

show_duration

Duration of widget display transition.

show_duration is a NumericProperty and defaults to 0.2.

hide_transition

The type of transition of the widget closing.

hide_transition is a StringProperty and defaults to ‘out_cubic’.

set_opacity() None
set_scale() None
on_dismiss() None
on_open(*args)
on__opacity(instance, value)
on__scale_x(instance, value)
on__scale_y(instance, value)
class kivymd.uix.behaviors.motion_behavior.MotionExtendedFabButtonBehavior

Base class for extended Fab button movement behavior.

For more information, see in the MotionBase class documentation.

show_transition

The type of transition of the widget opening.

show_transition is a StringProperty and defaults to ‘out_circ’.

shift_transition

Text label transition.

shift_transition is a StringProperty and defaults to ‘out_sine’.

show_duration

Duration of widget display transition.

show_duration is a NumericProperty and defaults to 0.3.

hide_transition

The type of transition of the widget closing.

hide_transition is a StringProperty and defaults to ‘linear’.

hide_duration

Duration of widget closing transition.

hide_duration is a NumericProperty and defaults to 0.2.

collapse(*args) None

Collapses the button.

expand(*args) None

Expands the button.

set_opacity_text_button(value: int) None
class kivymd.uix.behaviors.motion_behavior.MotionDialogBehavior

Base class for dialog movement behavior.

For more information, see in the ScaleBehavior MotionBase classes documentation.

show_transition

The type of transition of the widget opening.

show_transition is a StringProperty and defaults to ‘out_expo’.

show_button_container_transition

The type of transition of the widget opening.

show_button_container_transition is a StringProperty and defaults to ‘out_circ’.

hide_transition

The type of transition of the widget opening.

show_transition is a StringProperty and defaults to ‘hide_transition’.

show_duration

Duration of widget display transition.

show_duration is a NumericProperty and defaults to 0.2.

on_dismiss(*args)

Fired when a dialog closed.

on_open(*args)

Fired when a dialog opened.

class kivymd.uix.behaviors.motion_behavior.MotionTimePickerBehavior

Base class for time picker movement behavior.

For more information, see in the MotionPickerBehavior class documentation.

class kivymd.uix.behaviors.motion_behavior.MotionDatePickerBehavior

Base class for date picker movement behavior.

For more information, see in the MotionPickerBehavior class documentation.

class kivymd.uix.behaviors.motion_behavior.MotionShackBehavior

The base class for the behavior of the movement of snack bars.

For more information, see in the MotionBase class documentation.

on_dismiss(*args)

Fired when a snackbar closed.

on_open(*args)

Fired when a snackbar opened.