{"id":14988679,"url":"https://github.com/elcobvg/svelte-bulma-forms","last_synced_at":"2025-06-11T00:34:30.773Z","repository":{"id":57375138,"uuid":"140371868","full_name":"elcobvg/svelte-bulma-forms","owner":"elcobvg","description":"Bulma form components for Svelte","archived":false,"fork":false,"pushed_at":"2019-01-22T02:59:08.000Z","size":151,"stargazers_count":36,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T19:52:44.650Z","etag":null,"topics":["bulma","bulma-css","forms","javascript","svelte","svelte-components","sveltejs","ui"],"latest_commit_sha":null,"homepage":"http://svelte-bulma-forms.surge.sh/","language":"HTML","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/elcobvg.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":"2018-07-10T03:25:52.000Z","updated_at":"2024-09-09T21:19:44.000Z","dependencies_parsed_at":"2022-09-05T14:11:25.039Z","dependency_job_id":null,"html_url":"https://github.com/elcobvg/svelte-bulma-forms","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcobvg%2Fsvelte-bulma-forms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcobvg%2Fsvelte-bulma-forms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcobvg%2Fsvelte-bulma-forms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcobvg%2Fsvelte-bulma-forms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elcobvg","download_url":"https://codeload.github.com/elcobvg/svelte-bulma-forms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcobvg%2Fsvelte-bulma-forms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259176185,"owners_count":22817134,"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":["bulma","bulma-css","forms","javascript","svelte","svelte-components","sveltejs","ui"],"created_at":"2024-09-24T14:17:04.040Z","updated_at":"2025-06-11T00:34:30.744Z","avatar_url":"https://github.com/elcobvg.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-bulma-forms\nBulma form components for [Svelte.js](https://svelte.technology/)\n\nThese components offer a convenient way to build HTML forms, either in **Svelte** projects or in **plain JavaScript.**\n\n**Features**\n\n* all form elements as defined in Bulma\n* built-in basic input validation, easily extendable\n* controls and fields emit events for your app to hook into\n\n#### Demo at http://svelte-bulma-forms.surge.sh/\n\n\n## Install\n\n`npm install svelte-bulma-forms`\n\n## Use\n\nImport the components you need in your Svelte project.\n\n````javascript\nimport {\n  TextField,\n  DateField,\n  EmailField\n} from 'svelte-bulma-forms/module'\n\nexport default {\n  components: {\n    TextField,\n    DateField,\n    EmailField,\n  ...\n  }\n}\n````\nAnd then use them like so:\n\n````html\n\u003cTextField name=\"name\" label=\"Name\" horizontal /\u003e\n\n\u003cCheckboxGroup horizontal\u003e\n  \u003cCheckboxControl name=\"agree\" required\u003e\n    I agree to the \u003ca href=\"#\"\u003eterms and conditions\u003c/a\u003e\n  \u003c/CheckboxControl\u003e\n\u003c/CheckboxGroup\u003e\n\n\u003cButtonField state=\"info\" type=\"submit\" horizontal /\u003e\n````\n**Don't forget to include the Bulma and Font Awesome CSS files!**\n\nFor including styles, you can either place the below styles in the `\u003chead\u003e` of your template:\n\n````html\n\u003clink href=\"https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css\" rel=\"stylesheet\"\u003e\n\u003clink href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\"\u003e\n````\n\nOr you can import them to your webpack/rollup entry point:\n\n````javascript\nrequire('/path/to/node_modules/bulma/css/bulma.min.css')\nrequire('/path/to/node_modules/font-awesome/css/font-awesome.min.css')\n````\n\n**Note that you'll have to install** `bulma` **and** `font-awesome` **first**\n\n## Available elements\n\n### Form fields\n\n**Form fields** are composite components offering the most convenient way to build forms. The following fields are available:\n\n- `AutoCompleteField`\n- `ButtonField`\n- `DateField`\n- `EmailField`\n- `FileField`\n- `PasswordField`\n- `PasswordMaskField`\n- `SelectField`\n- `TextareaField`\n- `TextField`\n\nSee [**form fields**](https://github.com/elcobvg/svelte-bulma-forms/tree/master/src/fields)\n\n### Form controls\n\nIn cases where you may wish to use **form input fields** by themselves, you can use [**form controls**](https://github.com/elcobvg/svelte-bulma-forms/tree/master/src/controls). The following controls are available:\n\n- `AutoCompleteControl`\n- `ButtonControl`\n- `CheckboxControl`\n- `FileControl`\n- `InputControl`\n- `MultiSelectControl`\n- `RadioControl`\n- `SelectControl`\n- `TextareaControl`\n\n### Form groups\n\nControls like **checkboxes** and **radio buttons** need to be grouped together. There is also a group for regular inputs and grouped **buttons**:\n\n- `CheckboxGroup`\n- `InputGroup`\n- `RadioGroup`\n\nSee [**form groups**](https://github.com/elcobvg/svelte-bulma-forms/tree/master/src/groups)\n\n## Further information\n\n### Events\nEach input element emits a `change` event with its `value` on input change, which you can use in your app according to your needs.\n\n### Custom input validation\nIn addition to the built-in default input validation, you can supply your own validation rules and messages. Read all about it in the [**validation documentation**](https://github.com/elcobvg/svelte-bulma-forms/tree/master/src/validation)\n\n\n## Made with Svelte\nIt's made with [Svelte](https://svelte.technology/), which means you don't need any JS framework. Just use the file in the `dist` directory in any Javascript project:\n\n**include the bundle:** \n\n````html\n\u003cscript src=\"svelte-bulma-forms/dist/index.js\"\u003e\u003c/script\u003e\n````\n**create components like so:**\n\n````javascript\nconst { EmailField } = SvelteBulmaForms\n\nconst emailInput = new EmailField({\n  target: document.querySelector('#email'),\n  data: { \n    name: 'email',\n    label: 'Email address',\n    horizontal: true\n  }\n})\n````\n### See also\n\n- https://github.com/elcobvg/svelte-bulma-components a collection of Bulma UI components\n- https://github.com/elcobvg/svelte-autocomplete lightweight autocomplete component, without the Bulma styling\n\n### Reference\n\n- https://bulma.io/documentation/form/general\n- https://svelte.technology/guide\n- https://fontawesome.com/v4.7.0/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felcobvg%2Fsvelte-bulma-forms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felcobvg%2Fsvelte-bulma-forms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felcobvg%2Fsvelte-bulma-forms/lists"}