/v1.0

CallButton

CallButton opens the device's native dialer (via tel: URI) when clicked, targeting the provided phone number. It wraps the base Button component and pre-configures it with a phone icon and a green success color. Use it wherever you want to offer a one-tap call action.

Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | phoneNumber | string | Yes | — | Phone number to call. Include country code as needed (e.g. +5491112345678). | | title | string | No | "Llamar" | Label displayed on the button. | | icon | string | No | "phone" | Icon identifier shown before the label. | | color | string | No | "success" | Theme color key or any CSS hex/named color. | | type | "clear" \| "outline" \| "solid" | No | "solid" | Visual variant of the button. | | size | "xs" \| "sm" \| "md" \| "lg" \| "xl" | No | "md" | Controls padding, font size, and icon size. | | borderRadius | number | No | 4 | Border radius in pixels. | | disabled | boolean | No | false | Disables interaction and reduces opacity. | | style | React.CSSProperties | No | — | Inline styles applied to the button. |

Usage

Basic

import CallButton from '@/components/buttons/CallButton';

export default function Example() {
  return (
    <CallButton phoneNumber="+5491112345678" />
  );
}

Custom label and style

import CallButton from '@/components/buttons/CallButton';

export default function Example() {
  return (
    <CallButton
      phoneNumber="+5491112345678"
      title="Call Support"
      type="outline"
      size="sm"
      borderRadius={8}
    />
  );
}