Early access. Read the blog post

Getting started with Sanity UI

Install Sanity UI – an ergonomic React library for quickly building and prototyping accessible web apps:

npm install @sanity/ui

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

Basic usage  

Note: @sanity/ui only comes with one theme right now – studioTheme – which is built for use in Sanity products.

import {
  Card,
  Heading,
  studioTheme,
  ThemeProvider
} from '@sanity/ui'
import React from 'react'
import ReactDOM from 'react-dom'

ReactDOM.render(
  <App />,
  document.getElementById('root')
)

function App () {
  return (
    <ThemeProvider theme={studioTheme}>
      <Card padding={4}>
        <Heading>Welcome to Sanity UI</Heading>
      </Card>
    </ThemeProvider>
  )
}
Updated 1w ago
On this page
By
the platform for structured content