Start

Download RealCSS and put the directory in the right folder.


-> static
    -> css
    -> js
    -> RealCSS
    -> index.html
                

After that, just add the css and js core to your page. We also add Montserrat, Material icons and Jquery.


<!DOCTYPE html>
<html lang="en" translate="no">

<head>
    <title>RealCSS Example</title>
    <meta charset="UTF-8">
    <meta name="google" content="notranslate">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        
    <link rel="stylesheet" href="path_to_RealCSS/fonts/material-design-icons/material-design-icons-round.css">
    <link rel="stylesheet" href="path_to_RealCSS/fonts/montserrat/montserrat.css">

    <link rel="stylesheet" href="path_to_RealCSS/all.min.css">
</head>

<body>

    <!-- your code here -->

    <script src="path_to_RealCSS/jquery.min.js "></script>
    <script src="path_to_RealCSS/all.min.js "></script>
    
</body>

</html>
                

App

This is the how you must use the library to create each section. Each section can be contained in a div with a specific id.

Section title

Small Title

Hello World!

Colors

For each container, we can see the color.

If you want to set a color, use these colors as they will adapt to dark mode.

--main-background-color

--main-color

--border-color

--shadow-color

--overflow-color

--overflow-background-color

--ripple-color

--gray-1

--gray-2

--gray-3

--primary

--primary-hover

--primary-bg

--success

--success-hover

--success-bg

--warning

--warning-hover

--warning-bg

--danger

--danger-hover

--danger-bg

And if you have for example a .primary element, you can do this:

--color

--hover-color

--light-bg-color

Buttons

Simple buttons

Add the class .ripple-effect to create this effect.

Small buttons

Light buttons

Outligned buttons

Dropdown

Badge

Inputs

Text input

Enter some text

Enter some text

Enter some text

Enter some text

Enter some text

Toggle switch

This input is not easy to use and it's highly recommended to use a container like this.

Example text

Example text

Example text

Example text

Example text

Toggle switch with ripple effect

You can also add a ripple effect on this container like this.

Example text

Toggle switch to control the dark theme

Dark theme

Toggle switch to enable the automatic dark theme

This feature can be useful if you want to turn on the dark theme when your device's dark theme is on.

System default dark theme

Checkbox

Loader

To show the loader, use the function loader.

The loader will start to spin after 0.6 second if you don't use loader(false);

So if the loading process is very fast, the loader will not be shown.

You can choose the color of the loader like this:

Progress bar

To create a progress bar use the following code.

Alert

To open an alert box, give the alert title, the alert content (text only) and the alert actions (buttons, inputs)

Add the class .cancel to a button to make it close the alert box.

Tooltip

Just set the data-tooltip attribut to add a tooltip on an element.

Hover the button to show the tooltip.

warning You cannot add a tooltip on a .ripple-effect element.

Context menu

That's a basic context menu.

Right-click on me!

With colored icons...

Right-click on me!

Right-click on me!

Table

Simple table.

Column 1 Column 2 Column 3 Column 4
Some text Some text Some text Some text
Some text Some text Some text Some text
Some text Some text Some text Some text

Accordion

An accordion to show more or less content.

Some text...

Some text...

Some text...

Some text...

Some text...

Other

Horizontal menu

This example include a ripple effect but you can remove it removing the class .ripple-effect.

Horizontal menu with animation

This example include a ripple effect but you can remove it removing the class .ripple-effect.

Diagram