{"id":13599236,"url":"https://github.com/shaozi/svelte-steps","last_synced_at":"2025-04-06T23:18:12.219Z","repository":{"id":42534865,"uuid":"389650288","full_name":"shaozi/svelte-steps","owner":"shaozi","description":"🐾 A step component for svelte","archived":false,"fork":false,"pushed_at":"2024-07-20T05:35:26.000Z","size":741,"stargazers_count":105,"open_issues_count":11,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T21:11:14.379Z","etag":null,"topics":["bootstrap","svelte","sveltejs","ui","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shaozi.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-07-26T13:53:32.000Z","updated_at":"2025-03-12T13:55:50.000Z","dependencies_parsed_at":"2024-07-20T06:35:21.278Z","dependency_job_id":"535c6fcd-df07-4325-9f39-680ef384743a","html_url":"https://github.com/shaozi/svelte-steps","commit_stats":{"total_commits":62,"total_committers":3,"mean_commits":"20.666666666666668","dds":"0.12903225806451613","last_synced_commit":"6fef9940e354ced639bba5c5f72e8408b6bd9469"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":"sveltejs/component-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaozi%2Fsvelte-steps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaozi%2Fsvelte-steps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaozi%2Fsvelte-steps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaozi%2Fsvelte-steps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaozi","download_url":"https://codeload.github.com/shaozi/svelte-steps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563941,"owners_count":20958971,"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":["bootstrap","svelte","sveltejs","ui","ui-components"],"created_at":"2024-08-01T17:01:01.212Z","updated_at":"2025-04-06T23:18:12.190Z","avatar_url":"https://github.com/shaozi.png","language":"Svelte","funding_links":[],"categories":["📦 Built With Svelte"],"sub_categories":["Open-Source Projects"],"readme":"# 🐾 Svelte steps component 🐾\n\nA customizable step component written in Svelte!\n\n- [x] Bootstrap color theme\n- [x] Icons\n- [x] Animate progress\n- [x] Horizontal and vertical\n- [x] Dumpbells and bar\n- [x] Custom size\n- [x] Custom color\n- [x] Custom font\n- [x] Circle, square and between\n- [x] Left and right\n\n![demo](static/demo.png)\n\n## Installation\n\n```sh\nnpm install --saveDev svelte-steps\n```\n\n## Example Usages\n\nClone this project and run it. Itself is an example. Take a look at the homepage [here](https://svelte-steps.web.app).\nThe source file of the demo is at [src/routes/index.svelte](src/routes/index.svelte)\n\n### Basic Usage\n\n```javascript\n\u003cscript\u003e\n    import { Steps } from 'svelte-steps';\n    let steps = [\n        { text: 'step one' },\n        { text: 'step two' },\n        { text: 'the last step' }\n    ];\n\u003c/script\u003e\n\n\u003cSteps {steps} /\u003e\n```\n\n### Vertical Steps\n\n\u003e NOTE: needs svelte version 3.46.3 or newer\n\nAdd `vertical` props to `Steps` component.\n\n```javascript\n\u003cSteps vertical {steps} /\u003e\n```\n\nYou can also use `reverse` to put text label to the left.\n\n```javascript\n\u003cSteps vertical reverse {steps}\u003e\n```\n\n### With Icons\n\n```javascript\nlet steps = [\n  { text: 'step one', icon: IconMoney },\n  { text: 'step two', icon: IconPaperClip },\n  { text: 'the last step', icon: IconPerson },\n]\n```\n\n### Square Steps\n\n```javascript\n\u003cSteps {steps} borderRadius=\"0\"/\u003e\n```\n\n### Custom Color\n\n```javascript\n\u003cSteps {steps} primary=\"#ff0000\" secondary=\"#ffaaaa\"/\u003e\n```\n\n### Custom Size\n\n```javascript\n\u003cSteps {steps} size=\"2rem\" line=\"2px\"/\u003e\n```\n\n### No Text\n\n```javascript\nlet steps = [{ icon: IconMoney }, { icon: IconPaperClip }, { icon: IconPerson }]\n```\n\n### Bar\n\n```javascript\n\u003cSteps {steps} size=\"2rem\" line=\"2rem\"/\u003e\n```\n\n### Use alert and customize icons (**NEW**)\n\n````javascript\nimport Escalation from './YourEscalation.svelt'\n\u003cscript\u003e\n    let steps = [\n        { text: 'step one' , alert: true},\n        { text: 'step two' },\n        { text: 'the last step' }\n    ];\n\u003c/script\u003e\n\u003cSteps {steps} alertColor={'#ff00ff'} alertIcon={Escalation} checkIcon={null}\u003e\n```\n\n### Events\n\n```javascript\n\u003cSteps\n    {steps}\n    {current}\n    on:click={(e) =\u003e {\n        last = e.detail.last;\n        current = e.detail.current;\n    }}\n/\u003e\n````\n\n## Use with Bootstrap\n\nIt by default uses `--bs-primary`, `--bs-secondary`, `--bs-danger`, `--bs-light`, and `--bs-dark` css variables if they are defined. These css vars are defined in bootstrap css:\n\n```html\n\u003c!-- Include Bootstrap css in app.html \u003chead\u003e\u003c/head\u003e --\u003e\n\u003clink\n  href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css\"\n  rel=\"stylesheet\"\n  integrity=\"sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC\"\n  crossorigin=\"anonymous\"\n/\u003e\n```\n\n## Props\n\n- `steps`:\n  - Array of object. Length has to be more than 1\n  - Required\n  - Each item is a step object that can have:\n    - `text`: The text displayed below each steps.\n    - `icon`: A svelte component displayed inside each steps.\n    - `iconProps`: An object that will be passed as props to the `icon` component.\n- `current`: current step index. Number. Default `0`\n- `size`: size of the step buttons. String. Default `\"3rem\"` (`\"2rem\"` for vertical steps)\n- `line`: thickness of the connecting lines between the step buttons. String. Default `\"0.3rem\"` (`\"0.15rem\"` for vertical steps)\n- `primary`: Primary color of passed and current steps. String. Default `'var(--bs-primary, #3a86ff)'`\n- `secondary`: Secondary color of future steps. String. Default `'var(--bs-secondary, #bbbbc0)'`\n- `light`: Primary color of text color in passed anc current steps. String. Default `'var(--bs-light, white)'`\n- `dark`: Secondary color of text color in future steps. String. Default `'var(--bs-dark, black)'`\n- `borderRadius`: Border radius of the step buttons. String. Default `'50%'` (circle)\n- `fontFamily`: Font family of the component. String. Default `\"'Helvetica Neue', Helvetica, Arial, sans-serif\"`\n- `vertical`: Vertical steps. Default `false`\n- `reverse`: For horizontal steps, reverse the step from right to the left; for vertical steps, reverse puts text labels to the left. Default `false`\n- `clickable`: When set to `false`, Clicking icons and labels will not change step. You have to change `current` to change step. Default `true`\n- `checkIcon`: User defined check icon for passed steps. If not specified, use the default check mark. Set to `null` if you don't want a check icon.\n- `alertIcon`: User defined alert icon for passed steps that has truthful `alert` property. If not specified, use the default alert icon. Set to `null` if you don't want an alert icon.\n- `alertColor`: User defined bg color for passed steps that has truthful `alert` property. Default 'var(--bs-danger, #dc3545)'\n\n## Events\n\n- `on:click(e)`: click event. Event detail object has two keys:\n  - `e.detail.current`: the index of current step\n  - `e.detail.last`: the index of last step\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaozi%2Fsvelte-steps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaozi%2Fsvelte-steps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaozi%2Fsvelte-steps/lists"}