Typography
Typography plays a fundamental role in shaping the visual identity of our product and maintaining a consistent user experience. We prioritize accessibility, ensuring that the text, size, color and contrast we created is legible and will contribute to the overall experience of our users.
Please reference our guidance below on how and when to use the various text elements, as well as additional context on our font stack and font properties.
Fonts
Civil is the interface font for all text in Honeycomb. This includes all components, buttons, reports, and headings—there is no separate font family for titles or headings. This library includes all the necessary web fonts and licenses that you need to incorporate Civil.
Base text styles
Default interface text is set to 14px in Civil and does not have any leading or other text properties applied to it. Leading, spacing, and other properties are controlled by the semantic element and/or utility class you use.
Text hierarchy
Utility classes and class-less elements also style text, adding appropriate line heights, colors, cases, weights, and other propertyes. Use these classes in your text hierarchy as needed.
Headings
Headings 1 through 6 are available with semantic classes on the <h1>
to <h6>
elements. A utility class .hc-subheader
will also style text that should be secondary to a label or other section header.
You can always use these heading elements without the preformatted .hc-*
classes as well.
We recommend the following use cases for these headers:
<h1>
: page titles<h2>
: section titles or content titles within a page<h3>
: modal titles or headings in a right drawer component<h4>
: chart titles, table titles, or headings for larger components like these<h5>
: card titles or other headings that should have slightly larger 16px text<h6>
: alert titles or other content that should have the same size but different weight from body text
Paragraphs
Style text as prose using the .hc-body
class on any semantic element.
Add the .body--lg
modifier to increase the font size of a paragraph.
Captions and meta text
Captions provide additional explanatory text below images, tables, charts, or other objects. Add class .hc-caption
to any inline element to create caption text.
Meta text and microcopy provide additional ways of communicating assistance, metadata, or other deferred information. Add class .hc-meta
to any inline element to create a slightly subdued description or detail line.
Add class .hc-micro
for content that needs to be smaller than general interface text, like tiny links at the bottom of a menu or secondary details below a table value, for instance.
Design guidelines
- Keep the heading text short and clear.
- Follow a descending heading order.
- Use fonts bigger than 14 pixel.
- Don’t use two different sizes of text in the same line
- Keep text lines to a reasonable length (50-75 characters) to improve readability.
- Avoid excessively long lines of text.