PHPackages                             darrenmothersele/stylex - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. darrenmothersele/stylex

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

darrenmothersele/stylex
=======================

Stylex prototyping and style guide tool

141773PHP

Since Apr 24Pushed 11y ago2 watchersCompare

[ Source](https://github.com/darrenmothersele/stylex)[ Packagist](https://packagist.org/packages/darrenmothersele/stylex)[ RSS](/packages/darrenmothersele-stylex/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Stylex
------

[](#stylex)

Creating prototypes or style guides with Silex and Twig.

See [this blog post](http://www.darrenmothersele.com/blog/2015/03/20/stylex-prototype-style-guide-tool/) for more details.

I've created a [Barbones](https://github.com/darrenmothersele/stylex-barebones) project that demonstrates how to get started.

Features
--------

[](#features)

Create a style-guide or prototype front end code using Twig templates. Use YAML format to define sample data and content.

- Create an atomic design (component-based design) using the power of Twig
- Separate sample content out from your front-end markup
- Reuse templates later in your process
- Fully test front-end code before handing over to dev

Getting started
---------------

[](#getting-started)

Assuming you already have [Composer installed globally](https://getcomposer.org/doc/00-intro.md#globally)all you need to do is create a folder for your project and run the following command:

```
composer require darrenmothersele/stylex dev-master

```

This will download Stylex from Github and all the dependencies. It creates the `composer.json` file for you and downloads all the code for the dependencies into a `vendor` folder.

As a bare minimum you will need to create a `index.php` to run the application, and a starter template `templates/index.html`.

Create a file in the project root (same location as the generated `composer.json` file) called `index.php` with the following code:

```
