Skip to content

sanity-io/ui

Repository files navigation

@sanity/ui

The Sanity UI components.

npm install @sanity/ui

# Install peer dependencies
npm install react react-dom styled-components

npm version

Usage

import {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>,
)

Contributing and releasing new versions to npm

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 changeset

Once 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).

License

MIT-licensed. See LICENSE.

About

The Sanity UI design system.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages