{"templateId":"markdown","versions":[{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/elements/account-settings/unit-settings","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/elements/account-settings/unit-settings","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/elements/account-settings/unit-settings","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Unit Settings Element","keywords":"shipping, labels, shipstation, documentation, api","siteUrl":"https://docs.shipstation.com","lang":"en-US","llmstxt":{"hide":false,"title":"ShipStation API LLM Docs","description":"Find links and references to all markdown documentation for use with LLMs","excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"unit-settings-element","__idx":0},"children":["Unit Settings Element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Unit Settings Element allows you to change the units of measurement you prefer to use for the dimensions and weight of the packages you ship. This flexibility ensures that you can work with the units that best suit your needs."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, the Element selects imperial units (inches, pounds/oz) for US seller accounts and metric units (centimeters, grams/kilograms) for non-US seller accounts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The chosen units of measurement will be used within the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/elements/label-workflow/purchase-label"},"children":["Purchase Label Element"]}," when selecting package dimensions and on the shipment breakdown within the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/elements/label-workflow/shipment-summary"},"children":["Shipment Summary Element"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This can be used as a stand-alone Element and/or utilized within the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/elements/account-settings/account-settings"},"children":["Account Settings Element"]}," via the Units of Measure section."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"react-component","__idx":1},"children":["React Component"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"jsx","header":{"controls":{"copy":{}}},"source":"import { UnitSettings, ElementsProvider } from '@shipengine/elements';\nimport { themeConfig } from '../themeConfig';\n\nconst tokenPath = '/path/to/token/endpoint';\n\nconst Foo = () => {\n  const getToken = useCallback(() => {\n    return fetch(tokenPath).then((res) => res.text());\n  }, []);\n\n  return (\n    <ElementsProvider\n      getToken={getToken}\n      themeConfig={themeConfig}\n      onError={handleError}\n    >\n      <UnitSettings.Element />\n    </ElementsProvider>\n  );\n};\n","lang":"jsx"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sdk","__idx":2},"children":["SDK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"// Creates a new instance of the Elements SDK.\nconst elements = new ElementsSDK(getToken, {\n  onError: (err: Error) => console.error(err),\n  themeConfig: themeConfig,\n  locale: 'en-US',\n});\n\nconst unitSettings = elements.create('unitSettings');\n","lang":"js"},"children":[]}]},"headings":[{"value":"Unit Settings Element","id":"unit-settings-element","depth":1},{"value":"React Component","id":"react-component","depth":2},{"value":"SDK","id":"sdk","depth":2}],"frontmatter":{"seo":{"title":"Unit Settings Element"}},"lastModified":"2026-04-08T10:47:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/elements/account-settings/unit-settings","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}