@snapshot-ui/core
v0.10.0
Published
Design tokens, the Tailwind v4 theme and component CSS for Snapshot UI.
Maintainers
Readme
@snapshot-ui/core
Design tokens, the Tailwind v4 theme and component CSS for Snapshot UI. No JavaScript at runtime.
Install
pnpm add @snapshot-ui/react @snapshot-ui/coreUse
Import the stylesheet once, at the root of your app. styles.css holds the tokens and every component. base.css is optional: it sets the page background, the body type, the font rendering details and an ink focus ring for your own links and fields.
import '@snapshot-ui/core/styles.css';
import '@snapshot-ui/core/base.css';The CSS sits in cascade layers, so your own unlayered CSS always wins, and Tailwind's utilities win over the components.
With Tailwind CSS, tailwind.css exposes the tokens as utilities, such as bg-canvas, text-slate, rounded-control and p-part:
@import 'tailwindcss';
@import '@snapshot-ui/core/tailwind.css';
@import '@snapshot-ui/core/styles.css';Body text is set at weight 450, which only a variable font has. Load Sofia Sans as one; the installation guide shows how.
Components
styles.css draws every component below, and @snapshot-ui/react supplies the markup that goes with each. Every name links to its page in the documentation, with examples, props, keyboard use and design rules.
- Account menu
- App shell
- Avatar
- Badge
- Bottom tab bar
- Breadcrumbs
- Button
- Calendar
- Card
- Checkbox
- Collapsible card
- Combo box
- Command palette
- Conditional fields
- Confirm dialog
- Copy button
- Data table
- Date picker
- Date range picker
- Description list
- Dialog
- Drawer
- Empty state
- Field parts
- Field extras
- File drop zone
- Filter bar
- Filter chip
- Gauge
- Icon button
- Kbd
- Link
- Menu
- Meter
- Month grid
- Multi-select
- Number field
- Page header
- Pagination
- Panel layout
- Popover
- Progress bar
- Prose
- Radio group
- Repeater
- Save bar
- Search field
- Segmented control
- Select
- Sheet
- Side panel
- Sidebar
- Skeleton
- Spinner
- Stat tile
- Switch
- Tabs
- Theme switch
- Text area
- Text field
- Toast
- Tooltip
- Typography
- Upload tray
styles.css also draws the charts of @snapshot-ui/charts:
Links
License
MIT
