SegmentControlDefaults

Provides default values for the SegmentControl composable function.

Properties

Link copied to clipboard
@get:Composable
val backgroundColor: Color

The background color of the segment control.

Link copied to clipboard

The padding value of the segment control.

Link copied to clipboard
val ItemGap: Dp

the gap between icon and text in the item.

Link copied to clipboard
val ItemSpace: Dp

The space between items in the segment control.

Link copied to clipboard

The regular size of a segment control item.

Link copied to clipboard

The size of a segment control item in RichSegmentControl.

Link copied to clipboard

The small size of a segment control item.

Functions

Link copied to clipboard
@Composable
fun colors(): SegmentControlColors

the default colors for the segment control.

@Composable
fun colors(itemBackgroundColor: Color = Color.Unspecified, itemContentColor: Color = Color.Unspecified, selectedItemBackgroundColor: Color = Color.Unspecified, selectedItemContentColor: Color = Color.Unspecified): SegmentControlColors

Creates a new SegmentControlColors instance with the specified container color, content color, and selected content color. If the colors are not specified, the default colors from the color scheme will be used.

Link copied to clipboard
fun segmentControlSize(height: Dp = Dp.Unspecified): SegmentControlSize

Creates a SegmentControlSize instance with specified height. This function allows you to customize the size of a segment control by providing custom height values. If no values are provided, it uses Dp.Unspecified.

Link copied to clipboard

the default vibrants for the segment control.

@Composable
fun vibrants(itemBackgroundVibrant: Vibrant = Vibrant.Unspecified, itemContentVibrant: Vibrant = Vibrant.Unspecified, selectedItemBackgroundVibrant: Vibrant = Vibrant.Unspecified, selectedItemContentVibrant: Vibrant = Vibrant.Unspecified): SegmentControlVibrants

Creates a new SegmentControlVibrants instance with the specified container vibrant, content vibrant, and selected content vibrant. If the vibrants are not specified, the default vibrants from the color scheme will be used.