Yurba Docs
Yurba Documentation

Get started

Accounts

Apps

Users

Relationships

Dialogs (Messages)

Tracks (MuseBase)

Photos

Posts

Comments

Safety

Other

Yurba CDN (cdn.yurba.one)

Yurba Desktop API

Yurba Component Language

METHOD svgToIcon

Structure

svgToIcon: SVG svg, String name Description

Saves the icon in the application under your name and can then be used as an image using "custom:nameOfYourIcon"

Example usage

const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024"><g/><path d="M252.543 2.312c-138.207 0-250.415 112.21-250.415 250.417v521.265c0 138.207 112.208 250.417 250.415 250.417H773.81c138.207 0 250.415-112.21 250.415-250.417V252.729c0-138.207-112.208-250.417-250.415-250.417zm480.041 269.263c23.685 1.026 45.967 14.703 56.771 37.54 5.272 11.143 5.839 14.434 5.833 33.806-.031 110.076-71.907 214.401-176.886 256.731-108.147 43.606-227.293 17.465-309.662-67.94-26.474-27.453-42.267-51.501-57.039-86.872-12.833-30.728-18.618-57.113-19.952-90.993-.985-25.045-.618-30.388 2.716-39.77 5.429-15.268 20.871-31.212 36.559-37.745 10.25-4.268 14.78-4.979 27.593-4.35 18.897.928 31.386 6.152 43.368 18.143 13.457 13.464 18.131 25.356 20.232 51.517 4.909 61.075 34.458 105.789 86.63 131.099 41.959 20.355 86.809 20.355 128.77 0 52.617-25.524 81.752-70.111 86.768-132.784 2.552-31.879 13.49-50.561 36.08-61.612 10.4-5.087 21.455-7.238 32.219-6.771zM432.908 667.943c.842.018 11.573 1.858 23.847 4.088 16.456 2.992 31.267 4.059 56.375 4.059s39.92-1.067 56.375-4.059c12.276-2.23 23.007-4.069 23.853-4.088.844-.016 1.532 15.44 1.532 34.347 0 39.283-2.191 49.947-13.875 67.549-14.574 21.959-37.403 32.979-68.332 32.979-29.258 0-50.848-10.045-66.019-30.712-12.542-17.089-15.294-29.602-15.294-69.628 0-19.01.696-34.552 1.538-34.535"/></svg>` app.svgToIcon("yurba", svg) //later in the code const btn = app.createButton("Yurba status", "custom:yurba") /// ...