ChatiumFor developersPlaygroundPricing
Sign in

Button

Button

Properties

class: string | Array<string>

Button class

Possible values: section, primary, secondary, success, danger, warning, info, light, dark, link

style

Changes the appearance, positioning, and geometry of the block.

  • width, maxWidth, minWidth
    Width of the block. Learn more.

  • height, maxHeight, minHeight
    Height of the block. Learn more.

  • overflow
    How to display child elements when they take up excess space beyond the container. Learn more.

  • padding, paddingHorizontal, paddingVertical, paddingTop, paddingRight, paddingBottom, paddingLeft
    Internal padding of the container. Learn more.

  • margin, marginHorizontal, marginVertical, marginTop, marginRight, marginBottom, marginLeft
    External margins of the block. Learn more.

  • position
    Method of positioning the block: relative or absolute. Learn more.

  • top, right, bottom, left
    Offset from the original position. Learn more.

  • color
    Text color. Learn more.

  • fontFamily
    Name of the font family. Learn more.

  • fontSize
    Font size. Learn more.

  • fontStyle
    Ability to set the font to italic. Learn more.

  • fontWeight
    Font weight. Learn more.

  • fontVariant
    Ability to use monospaced digits. Learn more.

  • letterSpacing
    Letter spacing of the font. Learn more.

  • lineClamp
    Limit text height by the number of lines. Learn more.

  • lineHeight
    Amount of space allocated for one line of text in height. Learn more.

  • textAlign
    Principle of text alignment. Learn more.

  • textOverflow
    Method of truncating text when it overflows the container. Learn more.

  • border
    Setting borders for the block on all four sides: thickness, style, and color. Learn more.

  • borderTop, borderRight, borderBottom, borderLeft
    Setting individual borders for the sides of the block: thickness and color. Learn more.

  • borderRadius, borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius, borderTopRightRadius
    Rounding the corners of the borders. Learn more.

  • borderWidth, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth
    Thickness of the borders. Learn more.

  • borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor
    Color of the borders. Learn more.

  • backgroundColor
    Background color of the block. Learn more.

  • backgroundGradient
    Background gradient of the block. Learn more.

  • opacity
    Opacity of the entire block with its content. Learn more.

  • elevation
    Height of the shadow. Learn more.

  • shadowColor
    Shadow color of the block. Learn more.

  • flexBasis
    Initial size of the block along the main axis of the container. Learn more.

  • flexGrow
    Growth factor of the block along the main axis of the container. Learn more.

  • flexShrink
    Shrinkage factor of the block along the main axis of the container. Learn more.

  • flex
    Defines the size behavior of the block (growth, shrinkage, and initial size) along the main axis of the container. Learn more.

  • alignSelf
    Alignment of a specific block across the main axis of the container. Learn more.

  • transform
    Transformation of the geometry of blocks and containers in 2D and 3D space. Learn more.

    onClick: ChatiumActions
    Action on click

    onContext: ChatiumActions
    Action on long press on mobile or right-click on a computer

Example