The Sanity UI components.
npm install @sanity/ui
# Install peer dependencies
npm install react react-dom styled-componentsimport {Button, ThemeProvider} from '@sanity/ui'
import {buildTheme} from '@sanity/ui/theme'
import {createRoot} from 'react-dom/client'
const root = createRoot(document.getElementById('root'))
const theme = buildTheme()
root.render(
<ThemeProvider theme={theme}>
<Button text="Hello, world" />
</ThemeProvider>,
)This package lives in the sanity-io/ui monorepo and uses Changesets to manage versioning and publishing.
When you make a change that should be released, add a changeset to your pull request:
pnpm changesetOnce pull requests with changesets are merged into the main branch, a "Version Packages" pull request is opened (and kept up to date) that bumps the affected package versions and updates their changelogs. Merging that pull request publishes the packages to npm through the Release workflow, which uses npm Trusted Publishing (OIDC).
MIT-licensed. See LICENSE.