{"id":22514769,"url":"https://github.com/cityssm/bulma-js","last_synced_at":"2025-08-03T16:31:20.739Z","repository":{"id":37953413,"uuid":"429469772","full_name":"cityssm/bulma-js","owner":"cityssm","description":"The unofficial missing JavaScript library for Bulma websites","archived":false,"fork":false,"pushed_at":"2024-04-23T15:28:41.000Z","size":498,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-23T15:30:56.172Z","etag":null,"topics":["accessibility","aria","bulma","dropdown","javascript","tabs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cityssm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-18T14:54:03.000Z","updated_at":"2024-06-20T23:22:51.793Z","dependencies_parsed_at":"2024-06-20T23:22:39.907Z","dependency_job_id":"6c09a077-c037-448e-9304-1012717e6cd0","html_url":"https://github.com/cityssm/bulma-js","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.1333333333333333,"last_synced_commit":"104b6c44bafe1872745116864384a68d8f07e720"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fbulma-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fbulma-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fbulma-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cityssm%2Fbulma-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cityssm","download_url":"https://codeload.github.com/cityssm/bulma-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228553807,"owners_count":17936043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["accessibility","aria","bulma","dropdown","javascript","tabs"],"created_at":"2024-12-07T03:21:37.416Z","updated_at":"2024-12-07T03:21:37.896Z","avatar_url":"https://github.com/cityssm.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":["Courses"],"readme":"# bulma-js\n\n[![Codacy grade](https://img.shields.io/codacy/grade/a9a609f6824b4c61be84701ec8402d48)](https://app.codacy.com/gh/cityssm/bulma-js/dashboard)\n[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/cityssm/bulma-js)](https://codeclimate.com/github/cityssm/bulma-js)\n\n[![Made with Bulma](https://bulma.io/images/made-with-bulma.png)](https://bulma.io)\n\nThe unofficial missing JavaScript library for [Bulma](https://bulma.io/) websites.\n\n## Getting Started\n\nDownload [bulma-js.js](dist/bulma-js.js) here,\nuse the [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@cityssm/bulma-js?path=dist),\nor install from npm.\n\n```sh\nnpm install @cityssm/bulma-js\n```\n\nAdd the following to your HTML.\n\n```html\n\u003cscript src=\"dist/bulma-js.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  bulmaJS.init()\n\u003c/script\u003e\n```\n\n## Options\n\n### Toggle Functionality\n\n```javascript\nbulmaJS.setConfig('bulma.burger', true)\nbulmaJS.setConfig('bulma.dropdown', true)\nbulmaJS.setConfig('dropdown', true)\nbulmaJS.setConfig('tabs', true)\nbulmaJS.setConfig('window.collapse', true) // close dropdowns when clicked outside\n```\n\n### Set Unique Element Id Prefix\n\n```javascript\nbulmaJS.setConfig('bulmaJS.elementIdPrefix', 'bulma-js-')\n```\n\n### Set the \"Initialized\" Attribute Name\n\n```javascript\nbulmaJS.setConfig('bulmaJS.initAttribute', 'data-bulma-js-init')\n```\n\n### Initialize Functionality on Entire Page\n\nCan be called multiple times after page contents have changed.\n\n```javascript\nbulmaJS.init()\n```\n\n### Initialize Functionality on the Children of an Element\n\nHelpful after populating an area with an AJAX call.\n\n```javascript\nbulmaJS.init(document.getElementById('container-element'))\n```\n\n## Features So Far\n\n- Toggles appropriate Bulma classes **and ARIA attributes**.\n- Close `dropdown` and `navbar-dropdown` elements when other parts of the webpage are clicked.\n\n### Delete Buttons (Messages, Notifications, and Tags)\n\n\u003chttps://bulma.io/documentation/elements/notification/\u003e,\n\u003chttps://bulma.io/documentation/components/message/\u003e,\n\u003chttps://bulma.io/documentation/elements/tag/\u003e\n\n- Support for `delete` buttons within `notification`, `message`, and `tag` elements.\n  (Thanks [thibaultmeyer](https://github.com/thibaultmeyer) for the feature.)\n\n### Navbar\n\n\u003chttps://bulma.io/documentation/components/navbar/\u003e\n\n- Support for the `navbar-burger` element.\n- Support for the `navbar-dropdown` elements.\n\n### Dropdown\n\n\u003chttps://bulma.io/documentation/components/dropdown/\u003e\n\n- Support for the `dropdown` elements.\n\n### Tabs\n\n\u003chttps://bulma.io/documentation/components/tabs/\u003e\n\n- Support for the `tabs` elements.\n- Use the `href` attribute on each tab anchor element to link to\n  the corresponding tab panel.\n- All tab panels should be siblings. Hide the inactive tab panels with the `is-hidden` class.\n\n### Modal Alerts and Confirms\n\nMethods for creating accessible alerts and confirms.\n\n```javascript\nbulmaJS.alert('This is a basic alert!')\n\nbulmaJS.alert({\n  title: 'Alert',\n  message: 'This is a \u003cstrong\u003emore complex\u003c/strong\u003e alert.',\n  messageIsHtml: true,\n  contextualColorName: 'success',\n  okButton: {\n    text: 'Yes, But Not Too Complex',\n    callbackFunction: () =\u003e {\n      console.log('OK Button Pressed')\n    }\n  }\n})\n\nbulmaJS.confirm({\n  title: 'Question',\n  message: 'Have you ever been to Sault Ste. Marie, Ontario?',\n  contextualColorName: 'primary',\n  okButton: {\n    text: 'Yes, I Have',\n    callbackFunction: () =\u003e {\n      console.log('OK Button Pressed')\n    }\n  },\n  cancelButton: {\n    text: \"No, But I'd Like To\",\n    callbackFunction: () =\u003e {\n      console.log('Cancel Button Pressed')\n    }\n  }\n})\n```\n\n## Alternative Bulma JavaScript Project\n\nThe [BulmaJS](https://github.com/VizuaaLOG/BulmaJS) project\nalso provides JavaScript functionality for Bulma,\nand is **far more complete** than this project.\nI recommend you take a look if you need more functionality than is offered here.\n\nThis project goes in a different direction in a few ways.\n\n- Prioritizes simple usage in an HTML `script` tag. No `import` or `require` necessary.\n- TypeScript types available.\n- Goes beyond just toggling the `is-active` Bulma classes, and manages ARIA attributes as well to increase accessibility.\n- Attempts to correct common issues (i.e. missing roles, missing ids) that may affect accessibility.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityssm%2Fbulma-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcityssm%2Fbulma-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityssm%2Fbulma-js/lists"}