Radio button

Quick note on accessibility: Use fieldset and legend to wrap radio button sets. This helps screen readers and is a requirement to fulfill WCAG 2.0.

What is your favorite food?
Disabled example

Checkbox

Pets?
Pets?

Card

I'm a card!

Simulation Card

I'm a simulation card!

Status Texts

Text Success
Text danger

Accordion

Select

Simple Dropdown
Disabled Dropdown

Alerts

Well.. Somehow you managed!
Danger..Danger..Danger!
Calm Down.. Just FYI!

Input

Very helpful label description

If you look at the HTML you'll notice that the * isn't actually added as text. It is created by adding the class "required" to label

Uh oh! You done fucked up!

Wow! Who knew you could learn so much, so quickly. This is a really long text, isn't it?

This is how you should fix it

Input groups

https://
EUR
EUR
EUR
https://

Uh oh! You done fucked up!

Lorem ipsum dolor sit amet something something

Uh oh! You done fucked up!

Lorem ipsum dolor sit amet something something

Accessibility

To make the inputs more accessible when using screen readers, additional ARIA tags should be used.

https://

Uh oh! You done fucked up!

Lorem ipsum dolor sit amet something something

  • Add an ID to these tags: The input itself, prepend label, append label, label description, error message
  • Label: Add for="input-tag-id"
  • Input: Add aria-describedby="id1 id2 id3". Note how you can add multiple space separated IDs. The IDs listed should be the error, then prepend, then append, then label-description. If no error is provided, drop the error id.
  • Input: When there is an error, add aria-invalid="true"

Input types

Use type="text"

Use type="text", not type="number". To compensate, add inputmode="numeric" and pattern="[0-9]*. For more information why, read this .

Use type="text", not type="number". While it might be tempting to set inputmode to decimal, this can cause some devices to bring up a keypad without a key for the decimal separator. 🤦🏼‍♂️

Use type="tel". Also add autocomplete="tel". Ideally, don't stop people from using spaces, hyphens, brackets and dashes

Use type="email". Also add autocomplete="email" and spellcheck="false".

Use type="password". If the user is expected to enter a new password, also add autocomplete="new-password"

Typography

H0 - This is a test

H1 - This is a test

H2 - This is a test

H3 - This is a test

H4 - This is a test

H5 - This is a test

H6 - This is a test

Body-l - This is a test

Body-m - This is a test

Body-s - This is a test

Body-xs - This is a test

Caption-m - This is a test

Caption-s - This is a test

Caption-xs - This is a test

Rounded buttons

Normal

Disabled

Link

Blue Peach Secondary Tertiary

Icon

Pro buttons

Normal

Disabled

Link

Primary Secondary Tertiary Danger

Icon