SushiButton¶
A customizable button component that supports different visual styles, sizes, and content configurations.
SushiButton provides a standardized button implementation with support for:
- Different visual styles (Text, Solid, Outline)
- Various sizes (Small, Medium, Large)
- Prefix and suffix icons
- Custom content through the content parameter
- Accessibility through semantic properties
Example¶
The SushiButton
component is used to create buttons with various styles and configurations.
SushiButton(
props = SushiButtonProps(
text = "Solid Button",
type = SushiButtonType.Solid,
prefixIcon = SushiIconProps(code = SushiIconCodes.IconStarFill)
),
onClick = { /* Handle click */ },
modifier = Modifier.fillMaxWidth()
)
Component API¶
SushiButton¶
Parameter | Description |
---|---|
text |
Primary text to display in the button |
subText |
Optional secondary text below the primary text |
type |
Button style type (Text, Solid, or Outline) |
size |
Button size variant (Small, Medium, or Large) |
fontColor |
Color for the button text |
fontType |
Typography style for the button text |
color |
Background color of the button |
borderColor |
Color of the button border (for Outline type) |
suffixIcon |
Optional icon to display after the button text |
prefixIcon |
Optional icon to display before the button text |
enabled |
Whether the button is enabled and can be interacted with |
horizontalArrangement |
How to arrange content horizontally in the button |
verticalAlignment |
How to align content vertically in the button |
textAlignment |
Horizontal alignment of text within the button |
markdown |
Whether to interpret text as markdown |
shape |
The shape of the button |
iconSpacing |
Spacing between icons and text |