Keen CSS
Hello, friend.
I'm Keen CSS. Built atop Tachyons, I provide a flexible framework for building a more legibile, pleasant, and beautiful user experience for Keen IO.
Forms
Use these classes to attain consistency across some of the most interactive components in any user interface.
Inputs
Standard
Use this class on every input.
k--input
Read-only
This state is achieved when readonly
is set on the input
element with the k--input
class.
Disabled
This state is achieved when disabled
is set on the input
element with the k--input
class.
Validation
Invalid
k--input
b--red
focus-red
Valid
k--input
b--green
focus-green
Selects
Standard
k--select
Disabled
This state is achieved when disabled
is set on the select
element with the k--select
class.
Textareas
Standard
k--textarea
Readonly
This state is achieved when readonly
is set on the textarea
element with the k--textarea
class.
Disabled
This state is achieved when disabled
is set on the textarea
element with the k--textarea
class.
Labels and Helper Text
Label
To label form elements. This class can be applied to label
elements, or other elements like legend
or p
when appropriate.
k--label
Form Help
For helper text that follows a form field.
k--form-help
Some helpful text.
Radio Buttons
Radio Button
For better usability, put radio
input
s inside a corresponding label
with the k--label-radio
class.
<label class="k--label-radio">
<input type="radio" name="option-radios" id="option-radios-1" value="option-1">
Option One
</label>
Disabled Radio Button
This state is achieved when disabled
is set on the radio
input
.
Add a k--disabled
class to the label
to give the text a disabled appearance as well.
<label class="k--label-radio k--disabled">
<input type="radio" name="option-radios" id="option-radios-4" value="option-1" disabled>
Disabled Radio
</label>
Checkboxes
Checkbox
For better usability, put checkbox
input
s inside a corresponding label
with the k--label-checkbox
class. When this is done, not only is the checkbox
clickable, but the corresponsing text as well.
<label class="k--label-checkbox">
<input type="checkbox" name="option-checkboxes" id="option-checkboxes-1" value="option-1">
Option One
</label>
Disabled Checkbox
This state is achieved when disabled
is set on the checkbox
input
.
Add a k--disabled
class to the label
to give the text a disabled appearance as well.
<label class="k--label-checkbox k--disabled">
<input type="checkbox" name="option-checkboxes" id="option-checkboxes-4" value="option-1" disabled>
Disabled checkbox
</label>
Form Sizes
Small Inputs
For small inputs to fit in small places or subtler controls.
k--input
k--input-small
Large Inputs
For big inputs used mainly on marketing pages or simple forms.
k--input
k--input-large
Small Selects
For small selects to fit in small places or subtler controls.
k--select
k--select-small
Large Selects
For big selects used mainly on marketing pages or simple forms.
k--select
k--select-large
Form Components
Form Group
For grouping a set of inputs, or an input and button. These are mainly used when a button is tied to a single form input, and space and simplicity are essential. Simply surround the elements in a div
with the class k--group
<div class="k--group">
<input class="k--input" type="text" placeholder="Placeholder">
<button class="k--button" type="button">Button</button>
</div>
Badges
Badges give the ability to denote the status of something. Either an update, a quantity, a beta version, an error, or whatever else should have attention called to it.
Basic Badge
This is a basic badge, and can be easily styled by adding a class to change the background color.
k--badge
Blue Variant
k--badge
bg-blue
Green Variant
k--badge
bg-green
Gold Variant
k--badge
bg-gold
Red Variant
k--badge
bg-red