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 %>
NOTE: The value passed into the amount prop can be either a string or numeric value.
<%= pb_rails("currency", props: { amount: "30,327.43", label: "Default", size: "sm", margin_bottom: "md", }) %> <%= pb_rails("currency", props: { amount: "2,000.50", emphasized: false, label: "Emphasized False", margin_bottom: "md", size: "sm", }) %> <%= pb_rails("currency", props: { amount: 342, label: "Light", margin_bottom: "md", size: "sm", symbol: "€", variant: "light", emphasized: false, }) %> <%= pb_rails("currency", props: { amount: "45", label: "Bold", size: "sm", unit: "/mo", variant: "bold", }) %>
<%= pb_rails("currency", props: { amount: "2,000.50", label: "Small", margin_bottom: "md", size: "sm", }) %> <%= pb_rails("currency", props: { amount: "342", label: "Medium", margin_bottom: "md", size: "md", symbol: "€", }) %> <%= pb_rails("currency", props: { amount: "45", label: "Large", size: "lg", unit: "/mo", }) %>
<%= pb_rails("currency", props: { amount: "2,000.50", label: "Left", size: "sm", }) %> <%= pb_rails("currency", props: { align: "center", amount: "342", label: "Center", size: "sm", symbol: "€", }) %> <%= pb_rails("currency", props: { align: "right", amount: "45", label: "Right", unit: "/mo", size: "sm", }) %>
Remove the "$" symbol by setting an empty string: symbol: "".
Abbreviate larger amounts into thousands (K), millions (M), billions (B), and even trillions (T).
<%= pb_rails("currency", props: { abbreviate: true, amount: "2,200.50", label: "Thousands (with Unit)", margin_bottom: "md", unit: "/mo", }) %> <%= pb_rails("currency", props: { abbreviate: true, amount: "3424123", label: "Millions", margin_bottom: "md", }) %> <%= pb_rails("currency", props: { abbreviate: true, amount: "45,300,000,000", label: "Billions", margin_bottom: "md", }) %> <%= pb_rails("currency", props: { abbreviate: true, amount: "983,200,000,000,000", label: "Trillions", }) %>
Use decimals: "matching" when you want the full decimal amount displayed as a single number rather than split visually.
<%= pb_rails("currency", props: { amount: "372.12", decimals: "matching", label: "Small", margin_bottom: "md", size: "sm", unit: "/day", }) %> <%= pb_rails("currency", props: { amount: "30,327.43", decimals: "matching", label: "Medium", margin_bottom: "md", size: "md", symbol: "€", }) %> <%= pb_rails("currency", props: { amount: "621,953.99", decimals: "matching", label: "Large", size: "lg", }) %>
For alternative typography styles, you can pass a boolean prop called unstyled to the Currency kit and wrap it in any of our typography kits (Title, Body, Caption, etc.). This will allow the Currency kit to inherit any of our typography styles.
<%= pb_rails("currency", props: { amount: "2,000.50", label: "Basic unstyled example", margin_bottom: "md", unstyled: true }) %> <%= pb_rails("title", props: { size: 1 }) do %> <%= pb_rails("currency", props: { amount: "2,000.50", label: "Example with wrapping typography kit", unstyled: true }) %> <% end %>
The optional commaSeparator can be used to auto-format the use of commas as a thousands separator.
NOTE: If the value passed into the amount prop is already comma-dilineated, it will not add additional commas.
Small Currency kits have the negative sign on the lefthand side of the "$" symbol.
To customize how the amount field appears when it is empty, use the null_display prop and set it to the desired value you want to display.
<%= pb_rails("currency", props: { amount: "", label: "Nil", margin_bottom: "md", null_display: "--", size: "sm" }) %> <%= pb_rails("currency", props: { amount: "", label: "Nil", margin_bottom: "md", null_display: "$0.00", size: "sm" }) %> <%= pb_rails("currency", props: { amount: "", label: "Nil", null_display: " ", size: "sm" }) %>
Use this kit on tables, card displays, or on modals. It's versatile for displaying in the most condensed areas.
Emphasis on street happens by default. (no prop needed)
Emphasis on "city" makes the city emphasized, rather than the street.
Adding "none" to emphasis prop will provide no emphasis.
<%= pb_rails("home_address_street", props: { address: "70 Prospect Ave", address_cont: "Apt M18", city: "West Chester", home_id: 8250263, home_url: "https://powerhrg.com/", house_style: "Colonial", state: "PA", zipcode: "19382", territory: "PHL", }) %> <br> <br> <%= pb_rails("home_address_street", props: { address: "70 Prospect Ave", address_cont: "Apt M18", city: "West Chester", emphasis: "city", home_id: 8250263, home_url: "https://powerhrg.com/", house_style: "Colonial", state: "PA", zipcode: "19382", territory: "PHL", }) %> <br> <br> <%= pb_rails("home_address_street", props: { address: "70 Prospect Ave", address_cont: "Apt M18", city: "West Chester", emphasis: "none", home_id: 8250263, home_url: "https://powerhrg.com/", house_style: "Colonial", state: "PA", zipcode: "19382", territory: "PHL", }) %>
Use the target prop to control whether the link opens on the same or a new tab (same page is the default behavior). You can use any web/standard values or a custom string to specify your link target.
The state prop will always capitalize the state name, even if the data entered is in lowercase. For example, when state="pa" is passed, it will be rendered as "PA". When you pass preserve_case: true, the street address will be rendered exactly as entered, without automatic title capitalization.
Use this kit to display a label and a value with a certain status or color to highlight its significance or meaning. It can be a good design use to highlight the value incase it is important.
<%= pb_rails("label_pill", props: { label: "Service Needed", pill_value: "76", }) %> <%= pb_rails("label_pill", props: { label: "Waiting", pill_value: "69", variant: "success" }) %> <%= pb_rails("label_pill", props: { label: "In Service", pill_value: "28", variant: "error" }) %> <%= pb_rails("label_pill", props: { label: "Fully Serviced", pill_value: "101", variant: "warning" }) %> <%= pb_rails("label_pill", props: { label: "Inbox", pill_value: "197", variant: "info" }) %> <%= pb_rails("label_pill", props: { label: "Outbox", pill_value: "13", variant: "neutral" }) %> <%= pb_rails("label_pill", props: { label: "Inbox", pill_value: "218", variant: "primary" }) %>
Use this kit to display a label and value text for almost every data entry.
<%= pb_rails("label_value", props: { label: "Role", value: "Administrator, Moderator" }) %> <br> <%= pb_rails("label_value", props: { label: "Email", value: "anna.black@powerhrg.com" }) %> <br> <%= pb_rails("label_value", props: { label: "Bio", value: "Proin pulvinar feugiat massa in luctus. Donec urna nulla, elementum sit amet tincidunt nec, mattis nec urna. Cras viverra lorem odio, id pretium dui interdum ut. Nullam dignissim nisl vitae orci vehicula condimentum." }) %>
Variant details can pass icon, description, title, date, and active props.
<%= pb_rails("label_value", props: { variant: "details", label: "Installer", icon: "truck", title: "JD Installations LLC", }) %> <br> <%= pb_rails("label_value", props: { variant: "details", label: "Project", icon: "home", description: "33-12345", title: "Jefferson-Smith", }) %> <br> <%= pb_rails("label_value", props: { variant: "details", label: "Project", icon: "home", description: "33-12345", title: "Jefferson-Smith", date: Date.new(2019, 11, 18) }) %> <br> <%= pb_rails("label_value", props: { variant: "details", active: true, label: "Project", icon: "home", description: "33-12345", title: "Jefferson-Smith", date: Date.new(2019, 11, 18) }) %>
<%= pb_rails("title", props: { text: "Patient Profile", tag: "h4", size: 4, margin_bottom: "sm" }) %> <%= pb_rails("flex") do %> <%= pb_rails("flex", props: {orientation: "column", margin_right: "lg" }) do %> <%= pb_rails("label_value", props: { variant: "details", label: "Age", icon: "user", title: "24 yrs old", padding_bottom: "sm" }) %> <%= pb_rails("label_value", props: { variant: "details", label: "Weight", icon: "weight", title: "91 kg", }) %> <% end %> <%= pb_rails("flex", props: {orientation: "column"}) do %> <%= pb_rails("label_value", props: { variant: "details", label: "Blood", icon: "tint", title: "A +", padding_bottom: "sm" }) %> <%= pb_rails("label_value", props: { variant: "details", label: "Height", icon: "arrows-v", title: "187 cm", }) %> <% end %> <% end %> <br><br><br> <%= pb_rails("title", props: { text: "Workout Schedule", tag: "h4", size: 4, margin_bottom: "sm" }) %> <%= pb_rails("label_value", props: { variant: "details", label: "Chest", icon: "dumbbell", description: "6 sets • 8 reps • 40-100 kg", title: "Bench Press", padding_bottom: "sm", active: true }) %> <%= pb_rails("label_value", props: { variant: "details", label: "Biceps", icon: "dumbbell", description: "5 sets • 12 reps • 20-40 kg", title: "Barbell Curl", padding_bottom: "sm", active: true }) %> <%= pb_rails("label_value", props: { variant: "details", label: "Back", icon: "dumbbell", description: "8 sets • 8 reps • 40-120 kg", title: "Back Squat", padding_bottom: "sm", active: true }) %>
<%= pb_rails("person_contact", props: { first_name: "Harvey", last_name: "Walters", contacts: [ { contact_type: "email", contact_value: "email@example.com" }, { contact_value: 5555555555, }, { contact_type: "work", contact_value: "3245627482" } ] }) %> <%= pb_rails("person_contact", props: { first_name: "Brenda", last_name: "Walters", contacts: [ { contact_value: 5555555555, } ] }) %>
<%= pb_rails("person_contact", props: { first_name: "Harvey", last_name: "Walters", contacts: [ { contact_type: "email", contact_value: "email@example.com" }, { contact_value: 5555555555, contact_detail: "Home" }, { contact_type: "work", contact_value: "3245627482", contact_detail: "Work" } ] }) %>
<%= pb_rails("person_contact", props: { first_name: "Pauline", last_name: "Smith", contacts: [ { contact_type: "email", contact_value: "email@example.com", }, { contact_value: 5555555555 }, { contact_type: "wrong-phone", contact_value: "3245627482", }, { contact_type: "phone", contact_value: "3048615385", }, ] }) %>
<%= pb_rails("source", props: { source: "BJ's Johnston-208", type: "retail" }) %> <br><br> <%= pb_rails("source", props: { source: "Referral-phrg", type: "inbound" }) %> <br><br> <%= pb_rails("source", props: { source: "BJ's Future CB", type: "user", user: { name: "Anna Black", image: { url: "https://randomuser.me/api/portraits/women/44.jpg" }, user_id: "48582" } }) %>
<%= pb_rails("source", props: { source: "BJ's Johnston-208", type: "retail", hide_icon: true }) %> <br><br> <%= pb_rails("source", props: { source: "Referral-phrg", type: "inbound", hide_icon: true }) %> <br><br> <%= pb_rails("source", props: { source: "BJ's Future CB", type: "user", user: { name: "Anna Black", image: {url: "https://randomuser.me/api/portraits/women/44.jpg"}, user_id: "48582" }, hide_icon: true }) %>
<%= pb_rails("source", props: { source: "BJ's Johnston-208", type: "retail" }) %> <br><br> <%= pb_rails("source", props: { source: "Referral-phrg", type: "inbound" }) %> <br><br> <%= pb_rails("source", props: { source: "B.B.B. Outbound", type: "outbound" }) %> <br><br> <%= pb_rails("source", props: { source: "Contractor.com", type: "prospecting" }) %> <br><br> <%= pb_rails("source", props: { source: "Beards, Beers and Brats", type: "events" }) %> <br><br> <%= pb_rails("source", props: { source: "BJ's Johnston-208", type: "referral" }) %> <br><br> <%= pb_rails("source", props: { source: "Employee Referral", type: "referral", user: { name: "Anna Black", image: {url: "https://randomuser.me/api/portraits/women/44.jpg"}, user_id: "48582" } }) %> <br><br> <%= pb_rails("source", props: { source: "BJ's Future CB", type: "user", user: { name: "Anna Black", image: {url: "https://randomuser.me/api/portraits/women/44.jpg"}, user_id: "48582" } }) %>
<%= pb_rails("dashboard_value", props: { stat_label: "Decreased Value", stat_value: { value: 1428, unit: "appts" }, stat_change: { change: "decrease", value: 26.1 } }) %> <br><br> <%= pb_rails("dashboard_value", props: { stat_label: "Increased Value", stat_value: { value: 938, unit: "homes" }, stat_change: { change: "increase", value: 56.1 } }) %> <br><br> <%= pb_rails("dashboard_value", props: { stat_label: "Neutral Value", stat_value: { value: 261, unit: "windows" }, stat_change: { value: 86 } }) %> <br><br> <%= pb_rails("dashboard_value", props: { stat_label: "Pitch Rate", stat_value: { value: 90.9, unit: "%" } }) %>
<%= pb_rails("dashboard_value", props: { stat_label: "Top Title Value", stat_value: {value: 1428, unit: "appts"}, stat_change: {change: "decrease", value: 26.1} }) %> <br><br> <%= pb_rails("dashboard_value", props: { align: "center", stat_label: "Top Title Value", stat_value: {value: 1428, unit: "appts"}, stat_change: {change: "decrease", value: 56 } }) %> <br><br> <%= pb_rails("dashboard_value", props: { align: "right", stat_label: "Top Title Value", stat_value: {value: 1428, unit: "appts"}, stat_change: {change: "decrease", value: 86.1 } }) %>
Increase colors your icon GREEN & Decrease colors your icon RED.
Use this as value for displaying number data at a high level. It’s primary function is to create hierarchy of data within a view.
Use this to specify how many decimal places you want to show.
In react, you can pass in a string or number, but for this rails kit, we only accept numeric values and rails will not show trailing zero's unless specified.
Use this kit as a form of label value only for a numeric value.
<%= pb_rails("title_count", props: { title: "Remodeling Consultants", count: 527 }) %> <br> <%= pb_rails("title_count", props: { title: "Remodeling Consultants", count: 527, align: "center" }) %> <br> <%= pb_rails("title_count", props: { title: "Remodeling Consultants", count: 527, align: "right" }) %>
Use this kit in tables and cards to display data that doesn’t have a caption assigned.
<%= pb_rails("title_detail", props: { title: "Email Notifications", detail: "Commits data and history" }) %> <%= pb_rails("title_detail", props: { title: "Email Notifications", detail: "Commits data and history", align: "center" }) %> <%= pb_rails("title_detail", props: { title: "Email Notifications", detail: "Commits data and history", align: "right" }) %>