{"id":37014920,"url":"https://github.com/adnzaki/simple-tag-bootstrap","last_synced_at":"2026-01-14T01:29:46.452Z","repository":{"id":56941079,"uuid":"453153900","full_name":"adnzaki/simple-tag-bootstrap","owner":"adnzaki","description":"A Bootstrap v5 Components Adapter for PHP","archived":false,"fork":false,"pushed_at":"2022-12-06T04:18:54.000Z","size":1135,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-05-19T03:45:59.883Z","etag":null,"topics":["bootstrap","bootstrap5","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adnzaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-28T17:17:23.000Z","updated_at":"2023-12-24T16:44:45.000Z","dependencies_parsed_at":"2023-01-23T14:45:46.050Z","dependency_job_id":null,"html_url":"https://github.com/adnzaki/simple-tag-bootstrap","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/adnzaki/simple-tag-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnzaki%2Fsimple-tag-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnzaki%2Fsimple-tag-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnzaki%2Fsimple-tag-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnzaki%2Fsimple-tag-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adnzaki","download_url":"https://codeload.github.com/adnzaki/simple-tag-bootstrap/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adnzaki%2Fsimple-tag-bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap5","php"],"created_at":"2026-01-14T01:29:45.975Z","updated_at":"2026-01-14T01:29:46.435Z","avatar_url":"https://github.com/adnzaki.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleTagBootstrap\n\n## A Bootstrap v5 Components Adapter for PHP\n\n### What is SimpleTagBootstrap?\nSimpleTagBootstrap is an object-oriented Bootstrap v5 components adapter written with [SimpleTag](https://github.com/adnzaki/simple-tag) library. Its goal is to simplify usage of Bootstrap components when working with a lot of PHP codes. Just like \u003cstrong\u003eSimpleTag\u003c/strong\u003e that aims to make HTML programmable, this library aims to make Bootstrap usage easier and of course; programmable via PHP.\n\n### Installation\n#### Composer\nWe recommend you to install SimpleTagBootstrap via [Composer](https://getcomposer.org/), since it will ease you to update it. Other than that, if you have other libraries installed from composer, you will get advantages of autoloading that will not require you to include \"wrapper.php\" each time. Just type the command below to install:\n```\ncomposer require adnzaki/simple-tag-bootstrap\n```\nOr if you have a `composer.json` file, simply add requirement pointed to the package name:\n```\n\"require\": {\n    \"adnzaki/simple-tag-bootstrap\": \"^0.1.0\",\n}\n```\nIf you consider to get the latest source code, change \"^0.1.0\" into \"dev-master\", so it will download unreleased version of SimpleTagBootstrap.\u003cbr\u003e\nThen simply run `composer update` to install it.\n#### Manual Download\nYou can manually download SimpleTagBootstrap directly from this repository. Just point to \"Code\" menu and choose \"Download ZIP\" to download the latest source code or go to \"Release\" menu and find the latest stable version.\n\n### Ability\nWith SimpleTagBootstrap, we try to cover everything that Bootstrap components can do. For example in `\u003cinput\u003e` element, Bootstrap has many options needed by developer to build an input form, so we have adopted those options to be used in SimpleTagBootstrap as well.\n\n### How it works?\nSimpleTagBootstrap comes with a lot of classes contain most of Bootstrap components. It is SimpleTag-based library that simplifies Bootstrap components writing by converting them into SimpleTag format. So, you only have to call any component with the classes that has been provided.\n\n### Should I learn SimpleTag as well?\nNo, you have two options to pass your HTML elements into SimpleTagBootstrap class methods; with SimpleTag format or separate HTML file. But in certain cases, you need some basic usage of SimpleTag, it allows you to fully write your Bootstrap components without writing any HTML code.\n\n### Where is the example?\nJust open up `components` directory in this repository, and dive into each component that has been provided. There you will see an example for each component.\n\n### The \"Wrapper\" file\nThe important thing to activate SimpleTagBootstrap is calling the wrapper file on top of your PHP codes. Check out `index.php` file to see the complete code sample to start using SimpleTagBootstrap. Check out our SimpleTagBootstrap directory structure below before diving into the source code:\n```\n\\bootstrap\n    \\css\n    \\icons\n    \\js\n\\components\n    .... the components folder \n\\custom-slots\n\\simple-tag\n    .... SimpleTag library located here\n\\test\nwrapper.php\nindex.php\n.... and so on.\n```\n\n### Bootstrap Files\nWe have included necessary Bootstrap files to ease you when working with SimpleTagBootstrap. With this way, you have some advantages as follow:\n- Keep your Bootstrap up-to-date\n- Keep Bootstrap version the same as in SimpleTagBootstrap.\n- No need to download Bootstrap outside\n- Just a single step needed to update a whole SimpleTagBootstrap\n\n### Initiator Function\nEvery component in SimpleTagBootstrap defined in a class, but you do not have to initiate an object for each of them since we have \"Initiator Function\" that have done it for you. This function has the same name as its component class, for example `Accordion` class has initiator function called `accordion()`. So you can call the methods in that class directly without initiate an object first, like `accordion()-\u003eopen()` to create accordion open tag. Those functions located on their class file and have been wrapped together in Wrapper file.\n\n### The `BaseClass` class\nSimpleTagBootstrap has a class called `BaseClass` that shares commonly-used features on HTML element. It has the following methods to be used on all components:\n- `BaseClass::slot(string|array $slots)` to insert slot into component, it can be a string or array and should be in SimpleTag's accepted format.\n- `BaseClass::addClass(string|array $class)` to add a custom class to component\n- `BaseClass::id(string $id)` to create an ID to component\n- `BaseClass::attr(array $attributes = [])` to store additional attributes for your element. Additional attributes mostly used to define event handling, but in other case it can be used for any advanced HTML options like Vue's custom HTML attributes, eg. `v-model`, `v-bind`, `v-if`, etc. We also use this method internally to build up SimpleTagBootstrap components.\u003cbr\u003e\nCheck out each of component's example to see how to use them.\n- `BaseClass::preventBrowserOutput()` to prevent SimpleTag `render()` function from directly send the output to the browser. By running this method, you have to use `echo` statement when calling component's render method.\n- `BaseClass::position(string $positionStart, string $positionEnd, string $translate = '')` to set position of an element. Click [here](https://getbootstrap.com/docs/5.1/utilities/position/) for more detail explanation.\n- `BaseClass::positionType(string $value)` to set position value like static, relative, absolute, fixed, and sticky.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadnzaki%2Fsimple-tag-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadnzaki%2Fsimple-tag-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadnzaki%2Fsimple-tag-bootstrap/lists"}