@sanity/ui

sanity-io
esm cjs
@sanity/ui JS library homepage @sanity/ui JS library on GitHub @sanity/ui JS library on npm Download @sanity/ui JS library

The Sanity UI components.

Version 2.16.0 License MIT
@sanity/ui JS library homepage
@sanity/ui JS library on GitHub
@sanity/ui JS library on npm
Download @sanity/ui JS library
Keywords
sanityuiprimitivesreactcomponentsdesign-system
INSTALL
Type:
Version:
Learn more

@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>,
)

License

MIT-licensed. See LICENSE.