Call-to-action button with variant, size, text, and icon options. All variants use pill/circle shape.
{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "Buy Now",
"ui": {
"layout": {
"size": {
"width": "fill"
}
}
}
}
}{
"type": "cta",
"data": {
"text": "value"
}
}| Field | Type | Default | Description |
|---|---|---|---|
variant | enum filledoutlinedtexticon | filled | Visual style variant |
size | enum smallmediumlarge | large | Button size (small=32dp, medium=40dp, large=48dp) |
button_type | enum texticon | text | Button type (text or icon-only) |
textrequired | string | — | Button label text |
icon_url | string | — | Icon image URL (rendered without tint) |
icon_position | enum leadingtrailingnone | none | Icon placement relative to text (icon size: 20dp) |
| Field | Type | Default | Description |
|---|---|---|---|
background_color | color | — | Button fill (filled/icon) or border+text (outlined). Falls back to primary 500. |
text_color | color | — | Custom text/icon color |
{
"type": "cta",
"data": {
"variant": "outlined",
"size": "medium",
"text": "Add to Favorites"
}
}{
"type": "cta",
"data": {
"variant": "text",
"size": "medium",
"text": "View All"
}
}{
"type": "cta",
"data": {
"variant": "icon",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/heart-outline.svg"
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "small",
"text": "Small"
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "medium",
"text": "Medium"
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "Large (Default)"
}
}{
"type": "row",
"data": {
"children": [
{
"type": "cta",
"data": {
"variant": "filled",
"size": "small",
"text": "S"
}
},
{
"type": "cta",
"data": {
"variant": "filled",
"size": "medium",
"text": "M"
}
},
{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "L"
}
}
],
"ui": {
"layout": {
"spacing": 8,
"crossAxis": "center"
}
}
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "Chat with Seller",
"iconUrl": "https://api.iconify.design/mdi/chat-outline.svg",
"iconPosition": "leading",
"ui": {
"layout": {
"size": {
"width": "fill"
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "outlined",
"size": "small",
"text": "Share",
"iconUrl": "https://api.iconify.design/mdi/share-variant-outline.svg",
"iconPosition": "trailing"
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "WhatsApp",
"iconUrl": "https://api.iconify.design/mdi/whatsapp.svg",
"iconPosition": "leading",
"ui": {
"style": {
"backgroundColor": {
"palette": "success",
"shade": 500
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "text",
"size": "medium",
"text": "Delete",
"ui": {
"style": {
"textColor": {
"palette": "error",
"shade": 500
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "icon",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/whatsapp.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "success",
"shade": 50
}
}
}
}
}{
"type": "row",
"data": {
"children": [
{
"type": "cta",
"data": {
"variant": "icon",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/phone.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "primary",
"shade": 50
}
}
}
}
},
{
"type": "cta",
"data": {
"variant": "icon",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/whatsapp.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "success",
"shade": 50
}
}
}
}
},
{
"type": "cta",
"data": {
"variant": "icon",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/information-outline.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "info",
"shade": 50
}
}
}
}
}
],
"ui": {
"layout": {
"spacing": 8,
"crossAxis": "center"
}
}
}
}{
"type": "cta",
"data": {
"variant": "filled",
"size": "large",
"text": "Call Seller",
"iconUrl": "https://api.iconify.design/mdi/phone.svg",
"iconPosition": "leading",
"ui": {
"style": {
"backgroundColor": {
"palette": "success",
"shade": 500
}
},
"layout": {
"size": {
"width": "fill"
}
}
}
}
}Real patterns extracted from the 4Sale production API.
{
"type": "cta",
"data": {
"variant": "icon",
"size": "small",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/phone.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "primary",
"shade": 50
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "icon",
"size": "small",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/whatsapp.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "success",
"shade": 50
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "icon",
"size": "small",
"buttonType": "icon",
"iconUrl": "https://api.iconify.design/mdi/information-outline.svg",
"ui": {
"style": {
"backgroundColor": {
"palette": "info",
"shade": 50
}
}
}
}
}{
"type": "cta",
"data": {
"variant": "outlined",
"size": "small",
"text": "محادثة",
"iconUrl": "https://api.iconify.design/mdi/chat-outline.svg",
"iconPosition": "leading",
"ui": {
"style": {
"backgroundColor": {
"palette": "primary",
"shade": 500
},
"textColor": {
"palette": "primary",
"shade": 500
}
},
"parentLayout": {
"weight": 1
}
}
}
}