Use to display customer's or user's contact information.
The Contact kit automatically formats US phone numbers when the contactType / contact_type is one of: home (default), work, cell, work-cell, wrong-phone.
email to display emails.international to display International phone numbers exactly as provided (no formatting applied).extension to display four digit phone extensions.<%= pb_rails("contact", props: { contact_type: "cell", contact_value: "349-185-9988", }) %> <%= pb_rails("contact", props: { contact_value: 5555555555, }) %> <%= pb_rails("contact", props: { contact_type: "email", contact_value: "email@example.com", }) %> <%= pb_rails("contact", props: { contact_type: "work", contact_value: "3245627482", }) %> <%= pb_rails("contact", props: { contact_type: "work-cell", contact_value: "349-185-9988", }) %> <%= pb_rails("contact", props: { contact_type: "wrong-phone", contact_value: "2124396666", }) %> <%= pb_rails("contact", props: { contact_type: "extension", contact_value: "1233", }) %> <%= pb_rails("contact", props: { contact_type: "international", contact_value: "+44 7700 900461", }) %>
<%= pb_rails("contact", props: { contact_type: "cell", contact_value: "349-185-9988", contact_detail: "Cell", }) %> <%= pb_rails("contact", props: { contact_value: 5555555555, contact_detail: "Home", }) %> <%= pb_rails("contact", props: { contact_type: "work", contact_value: "3245627482", contact_detail: "Work", }) %> <%= pb_rails("contact", props: { contact_type: "work-cell", contact_value: "3245627482", contact_detail: "Work-Cell", }) %> <%= pb_rails("contact", props: { contact_type: "extension", contact_value: "1233", contact_detail: "Ext", }) %> <%= pb_rails("contact", props: { contact_type: "international", contact_value: "+44 7700 900461", contact_detail: "International", }) %>
Use the Contact kit with icon_enabled: false and unstyled: true to display phone numbers with full typography control. When unstyled: true, the Contact kit renders just the formatted text without a Body wrapper, allowing you to wrap it in your own Typography kit to control the color and styling.
<%= pb_rails("body", props: { color: "default" }) do %> <%= pb_rails("contact", props: { contact_value: "2125551234", icon_enabled: false, unstyled: true }) %> <% end %> <%= pb_rails("body", props: { color: "light" }) do %> <%= pb_rails("contact", props: { contact_value: "12125551234", icon_enabled: false, unstyled: true }) %> <% end %> <%= pb_rails("body", props: { color: "lighter" }) do %> <%= pb_rails("contact", props: { contact_value: "4155551234", icon_enabled: false, unstyled: true }) %> <% end %> <%= pb_rails("body", props: { color: "default" }) do %> <%= pb_rails("contact", props: { contact_type: "extension", contact_value: "1234", icon_enabled: false, unstyled: true }) %> <% end %>
| Props | Type | Values |
|---|---|---|
align_content |
enum | responsive
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
align_items |
enum | responsive
|
start
end
center
|
border_radius |
enum
|
none
xs
sm
md
lg
xl
rounded
|
cursor |
enum
|
auto
default
none
contextMenu
help
pointer
progress
wait
cell
|
dark |
boolean
|
true
false
|
flex |
enum | responsive
|
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none
|
flex_direction |
enum | responsive
|
row
column
rowReverse
columnReverse
|
flex_wrap |
enum | responsive
|
wrap
nowrap
wrapReverse
|
justify_content |
enum | responsive
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
line_height |
enum
|
loosest
looser
loose
normal
tight
tighter
tightest
|
margin_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin |
array
|
none
xxs
xs
sm
md
lg
xl
|
width |
string
|
|
min_width |
string
|
|
max_width |
string
|
|
gap |
string | responsive
|
|
column_gap |
string | responsive
|
|
row_gap |
string | responsive
|
|
number_spacing |
enum
|
tabular
|
order |
enum | responsive
|
none
first
1
2
3
4
5
6
7
8
9
10
11
12
|
overflow_x |
enum
|
scroll
visible
hidden
auto
|
overflow_y |
enum
|
scroll
visible
hidden
auto
|
overflow |
enum
|
scroll
visible
hidden
auto
|
padding_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding |
array
|
none
xxs
xs
sm
md
lg
xl
|
position |
enum
|
relative
absolute
fixed
sticky
static
|
shadow |
enum
|
none
deep
deeper
deepest
|
text_align |
enum | responsive
|
start
end
left
right
center
justify
justifyAll
matchParent
|
truncate |
enum
|
none
1
2
3
4
5
|
vertical_align |
enum | responsive
|
baseline
super
top
middle
bottom
sub
text-top
text-bottom
|
z_index |
enum | responsive
|
1
2
3
4
5
6
7
8
9
10
max
|
top |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
inset |
boolean
|
true
false
|
right |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
bottom |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
left |
enum | object
|
xxs
xs
sm
md
lg
xl
xxl
|
height |
string
|
|
max_height |
string
|
|
min_height |
string
|
|
hover |
object
|
|
group_hover |
boolean
|
true
false
|
| Props | Type | Values | Default |
|---|---|---|---|
contact_detail |
string
|
||
contact_type |
string
|
||
contact_value |
string
|
||
icon_enabled |
boolean
|
true
false
|
true
|
unstyled |
boolean
|
true
false
|
false
|