CSS and theme in yii2


I use yii2 advanced.

I just looked arround for free themes and colorshemes for yii2

I found some and it worked to integrate them.

But my basic understanding seems to be ‘not up to date’ ;)

yii2 uses bootstrap3 ?

If yes, can I take a bootstrap3 theme (and/or only colorsheme) and use them (include file=>override the original definition, not file)?

How would be the best practice to make a theme?

Which classes do I have to define - is there a listing somewhere, which style-classes yii2 uses?

I’m not the good colordesigner and so I would like to use a good colorsheme.

I’ve tried some onlineeditors. They are more or less good but I would like to start with a colorsheme which is for e.g. 60% ok for me.

Where can I find useabe (for yii2) coloshemes?

Thank you.

Hi nomac,

I’m not good at theming that’s why I have publish a simple yii2 extension to bring some color to the default bootstrap theme… maybe it can also be useful to you as a starting point.

Check it out



Hi! is there a guide to build an yii2 frontend theme?

I’m trying to create my custom theme :(

Hi Guys, sorry my idiot question, but what the difference between theme and use olny bootstrap?

Nowadays theme is really necessary? If is necessary, Why?

It depends on the application. Theming is usually unnecessary for a typical website but if you develop a reusable application (a CMS, for example) it provides an easy way for end users to customize the design without modifying the code of the application.It also helps you integrate 3rd party modules and make them look similar to your other pages.

Thanks @phtamas. It help me a lot to understand the conception.

Yii2 doesn’t put any restrictions on the structure, layout or design of your HTML pages. (It’s worth mentioning that there’s no dependency on Bootstrap.) The only mandatory code is

<?= $content ?>

somewhere in your layout template(s). So building a theme is both easy (you can do what you want) and difficult (no rules to serve as guidelines). The view component provides a lot of useful methods (in addition to simply rendering templates) but you aren’t forced to use any of them. Explore them, try to make use of them, and build your theme as it fits your needs.

I’m trying to custom a template creating a folder “template1” under frontend/themes, so what’s the default theme folder structure, I’ve very difficult to include column, header and footer file to compose template and to custom html for widget, for example insert a Nav::Widget into a div because params are defined only for it

help me :-[


You could for example download a Theme from:


And look how they did it. :)


@MetaCrawler The websit is down!


Please try again later…

I think it is only a temporary problem.

When I posted the link the webiste was up and running. :)


I foundout this site, that explain how to implement a thema.


Thank you phtamas.

That is a big part in the puzzle understanding Yii.