Divider#
#
New in version 2.0.0.
See also
Dividers are thin lines that group content in lists or other containers.
Make dividers visible but not bold
Only use dividers if items can’t be grouped with open space
Use dividers to group things, not separate individual items
KivyMD provides the following bar positions for use:
HorizontalDivider#
Dividers are one way to visually group components and create hierarchy. They can also be used to imply nested parent/child relationships.
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
MDScreen:
md_bg_color: self.theme_cls.backgroundColor
MDDivider:
size_hint_x: .5
pos_hint: {'center_x': .5, 'center_y': .5}
'''
class Example(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)
Example().run()
VerticalDivider#
A vertical divider can be used to arrange content on a larger screen, such as separating paragraph text from video or imagery media.
MDDivider:
size_hint_y: .5
orientation: "vertical"
API break#
1.2.0 version#
MDSeparator:
[...]
2.0.0 version#
MDDivider:
[...]
API - kivymd.uix.divider.divider
#
- class kivymd.uix.divider.divider.MDDivider(**kwargs)#
A divider line.
New in version 2.0.0.
For more information, see in the
BoxLayout
class documentation.- color#
Divider color in (r, g, b, a) or string format.
color
is aColorProperty
and defaults to None.
- divider_width#
Divider width.
divider_width
is anNumericProperty
and defaults to dp(1).