# Jetpack Compose: Divider

DevFeed: [Jetpack Compose: Divider](<https://devfeed.tech/articles/jetpack-compose-divider-24850.md>)

Original publisher: [Read original article](<https://alexzh.com/jetpack-compose-divider/>)

Author: Alex Zhukovich

Published: 2024-02-08T11:33:53Z

Content type: article

Language: en

Sources: [Alex Zhuk](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>)

Tags: [canvas](<https://devfeed.tech/tags/canvas.md>), [compose](<https://devfeed.tech/tags/compose.md>), [custom](<https://devfeed.tech/tags/custom.md>), [customization](<https://devfeed.tech/tags/customization.md>), [here](<https://devfeed.tech/tags/here.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [material](<https://devfeed.tech/tags/material.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>)

## AI overview

The excerpt distinguishes Material 2's divider, which uses a container, from Material 3's HorizontalDivider and VerticalDivider, which draw a line. Material 3 dividers take color, thickness and modifier parameters. HorizontalDivider uses available width by default; VerticalDivider uses available height, so its container needs a height constraint. The excerpt recommends a minimum-height arrangement for rendering children and notes that dividers add no surrounding space. Customization is limited: use the modifier for sizing or padding and the color and thickness parameters for appearance. For specialized layouts, the article describes drawing a custom divider on a canvas, including a diagonal path separator whose required width must be considered.

## Source excerpt

This article covers using and customizing the "Dividers" components from the "Material 2" and "Material 3" libraries in the Jetpack Compose. In addition to that, we will explore the difference between implementation of the Divider, HorizontalDivider and VerticalDivider.