Skip to content
SolidUI
Getting started

Install

Three packages share one set of tokens. Use @bilursag/solidui-react on the web and @bilursag/solidui-native in React Native; both depend on @bilursag/solidui-tokens.

Web — React + Tailwind CSS v4

Works with Next.js, Vite, Remix… anything that runs Tailwind v4.

npm install @bilursag/solidui-react
app/globals.css
@import "tailwindcss";
@import "@bilursag/solidui-react/styles.css";
Use it
import { Button, Card, CardHeader, CardTitle, Field, Input } from '@bilursag/solidui-react';

export function SignUp() {
  return (
    <Card>
      <CardHeader><CardTitle>Create an account</CardTitle></CardHeader>
      <Field label="Email" hint="We never share it.">
        <Input type="email" placeholder="you@example.com" />
      </Field>
      <Button block>Continue</Button>
    </Card>
  );
}
  • Dark mode: add the dark class to <html> or any ancestor (light forces light inside a dark area).
  • Next.js App Router: the components are marked 'use client', so Server Components can render them.
  • Your own fonts: import @bilursag/solidui-react/no-fonts.css and set --sui-font-rounded / --sui-font-heading.

React Native — Expo + NativeWind v4

The same components and API, with Reanimated springs and haptics.

Terminal
npx expo install @bilursag/solidui-native nativewind react-native-reanimated react-native-worklets expo-haptics expo-linear-gradient expo-font
npm install -D tailwindcss@^3.4
tailwind.config.js
module.exports = {
  content: [
    './App.tsx',
    './src/**/*.{ts,tsx}',
    './node_modules/@bilursag/solidui-native/lib/**/*.js', // the classes SolidUI uses
  ],
  presets: [require('nativewind/preset'), require('@bilursag/solidui-native/tailwind-preset')],
};
App.tsx
import './global.css';
import { useFonts } from 'expo-font';
import { useColorScheme } from 'react-native';
import { Button, ThemeProvider } from '@bilursag/solidui-native';
import { fonts } from '@bilursag/solidui-native/fonts';

export default function App() {
  const [loaded] = useFonts(fonts);
  const scheme = useColorScheme() === 'dark' ? 'dark' : 'light';
  if (!loaded) return null;
  return (
    <ThemeProvider scheme={scheme}>
      <Button onPress={() => {}}>Continue</Button>
    </ThemeProvider>
  );
}

Set up NativeWind as usual: jsxImportSource: 'nativewind' in babel.config.js, withNativeWind in metro.config.js (pass inlineRem: 16 so rem spacing matches the web) and a global.css with the three @tailwind directives.

Getting started

Theming

Neutrals and status colors stay fixed. The brand group — brand, hover, press, tint, ink, on-brand, focus and the gradient — is derived from one color, and every pair is checked against WCAG AA.
Try it livePick a color, see every component and its contrast, copy the result.
Theme builder
Web: generate the CSS once
npx @bilursag/solidui-tokens theme --brand "#0a7d5a" --out src/solidui-theme.css
# ✓ 56 contrast checks pass (WCAG AA)

/* globals.css */
@import "tailwindcss";
@import "@bilursag/solidui-react/styles.css";
@import "./solidui-theme.css";
React Native: build it in JS
import { createTheme, ThemeProvider } from '@bilursag/solidui-native';

// Outside render
const theme = createTheme({ brand: '#0a7d5a' });

<ThemeProvider scheme={scheme} theme={theme}>
  …
</ThemeProvider>
createTheme options
createTheme({
  brand: '#0a7d5a',                         // or { light: '#0053cc', dark: '#1f6bff' }
  accent: '#22d3fe',                        // second gradient color (default: a neighbouring hue that keeps on-brand legible)
  colors: { light: { 'brand-tint': '…' } }, // exact overrides per token and scheme
  fonts: { rounded: '"Inter", sans-serif' },// web font stacks
});

checkContrast(theme); // [{ scheme, fg, bg, ratio, min, pass }, …]
themeVars(theme, 'light'); // { '--sui-brand': '#0a7d5a', … } for a style prop
Foundations

Colors

Each token has a light value (left half) and a dark one (right half). In code they are classes: bg-surface, text-ink-2, bg-brand-tint…

Surfaces

Back to front. No borders: fills and shadows do the separating.

canvas#fbfbfa · #0e0f12
panel#f3f3f1 · #15171b
surface#ffffff · #1a1d22
fill#f0f0ee · #23262c
fill-strong#e8e8e5 · #2b2f36
fill-press#e0e0dc · #333840
line#e4e4e1 · #2e3239

Ink

ink and ink-2 are text (≥ 4.5:1). ink-3 is for icons, placeholders and decoration only (≥ 3:1).

ink#141414 · #f3f4f6
ink-2#67676b · #a1a6b0
ink-3#88888d · #7c818b

Brand

Derived from one color. brand for fills with on-brand text; brand-ink for brand-colored text and icons.

brand#4b48e0 · #5d5ae3
brand-hover#423fc5 · #5653d1
brand-press#3937aa · #4e4cbf
on-brand#ffffff · #ffffff
brand-tint#ededfc · #1e1e3c
brand-ink#4b48e0 · #8482ea
brand-2#ad4cca · #a652be
focus#4b48e0 · #8482ea

Status

Each status has a fill, a tint (soft background) and an ink (text on the tint).

success#1f9d55 · #2fc26b
success-tint#e6f6ec · #12291c
success-ink#157a41 · #5fd893
warning#f5a524 · #f5a524
warning-tint#fef4e2 · #2c2210
warning-ink#8a5a00 · #ffc766
danger#d93a3f · #d93a3f
on-danger#ffffff · #ffffff
danger-tint#fdecec · #2d1517
danger-ink#c33035 · #ff8a8d

Brand gradient

brand → brand-2, for headers and highlights (bg-brand-gradient).

WCAG contrast

The 56 checks (both schemes) that every theme runs. The build fails if the default theme misses one; the theme CLI refuses to write a theme that does.

Text / backgroundSampleMinimumLightDark
ink / canvas
AaAa
4.5:117.7917.41
ink / surface
AaAa
4.5:118.4215.35
ink-2 / surface
AaAa
4.5:15.636.92
ink-2 / canvas
AaAa
4.5:15.447.85
ink-2 / fill
AaAa
4.5:14.946.21
ink-2 / fill-strong
AaAa
4.5:14.595.50
ink-3 / surface
AaAa
3:13.534.32
ink-3 / canvas
AaAa
3:13.414.90
ink-3 / fill
AaAa
3:13.093.88
on-brand / brand
AaAa
4.5:16.365.20
on-brand / brand-hover
AaAa
4.5:17.645.91
on-brand / brand-press
AaAa
4.5:19.136.75
on-brand / brand-2
AaAa
3:14.504.59
brand-ink / surface
AaAa
4.5:16.365.12
brand-ink / canvas
AaAa
4.5:16.145.81
brand-ink / fill
AaAa
4.5:15.574.59
brand-ink / brand-tint
AaAa
4.5:15.494.87
focus / surface
AaAa
3:16.365.12
focus / canvas
AaAa
3:16.145.81
on-danger / danger
AaAa
4.5:14.544.54
on-danger / danger-hover
AaAa
4.5:15.535.53
danger-ink / surface
AaAa
4.5:15.537.46
danger-ink / canvas
AaAa
4.5:15.348.46
danger-ink / danger-tint
AaAa
4.5:14.857.53
success-ink / surface
AaAa
4.5:15.409.44
success-ink / success-tint
AaAa
4.5:14.828.63
warning-ink / surface
AaAa
4.5:15.9310.95
warning-ink / warning-tint
AaAa
4.5:15.4310.13
Foundations

Typography

Montserrat for large titles (display and title), Open Runde for everything else. Each style carries its size and line height together.
import { typeScale, textMetrics } from '@bilursag/solidui-tokens'
text-display34/40 · Montserrat 800

Make it soft

text-title24/32 · Montserrat 700

Everything at hand

text-heading20/28 · Open Runde 600

Order summary · 3 items

text-body16/24 · Open Runde 500

Body text: descriptions, paragraphs and main content.

text-body-sm15/21 · Open Runde 500

Secondary text under a title or in dense lists.

text-label14/20 · Open Runde 600

Field label

text-caption13/18 · Open Runde 500

Small print: hints, dates, metadata.

text-micro11/14 · Open Runde 600

COUNTER · BADGE

text-btn17/22 · Open Runde 600

Continue to checkout

Web and native
// Web: the class brings size + line height (+ tracking on titles)
<h2 className="font-heading text-title font-bold">Your orders</h2>
<p className="text-body-sm font-medium text-ink-2">3 this month</p>

// React Native with @bilursag/solidui-native
<Text variant="title">Your orders</Text>
<Text variant="body-sm">3 this month</Text>

// React Native with StyleSheet
const styles = StyleSheet.create({ title: { ...textMetrics('title'), fontFamily: 'Montserrat-Bold' } });
Foundations

Radii and heights

Generous corners and tall, touch-friendly controls. A pill is half the control height.

Radii

Classes rounded-item, rounded-row, rounded-card…

rounded-item10 px · Menu items
rounded-check8 px · Checkbox
rounded-row16 px · Inputs, rows
rounded-card24 px · Cards
rounded-sheet32 px · Sheets, dialogs
rounded-panel40 px · Large panels
rounded-pillpill · Buttons, badges

Control heights

Classes h-control-md, size-control-sm… (on native too).

36 px
control-xsButton xs, chips
44 px
control-smButton sm, input sm
52 px
control-mdButton and input md
56 px
control-lgButton lg, CTAs
64 px
control-xlHighlights
Foundations

Elevation

Shadows instead of borders. A shadow disappears on dark backgrounds, so in dark mode every level adds a 1 px ring of light.
shadow-softCards and light buttons at rest
shadow-raisedHover, focused field
shadow-overlayMenus, dialogs, sheets
shadow-softCards and light buttons at rest
shadow-raisedHover, focused field
shadow-overlayMenus, dialogs, sheets
Foundations

Motion

When pressed, controls give on a spring and barely bounce back; colors change with a short fade. With the system's reduce-motion setting, durations drop to 0.
Spring (ease-spring · 600 ms)

Pills scale to 0.97; round buttons give more, to 0.92.

press-springUtility: spring scale + faded colors
--sui-dur-fast150 ms · colors and shadows
--sui-dur-fade220 ms · opacity
--sui-dur-spring600 ms · spring scale
ease-fadecubic-bezier(0.2, 0, 0, 1)
ReanimatedwithSpring(v, { damping: 15, stiffness: 320 })
Components

Button

A pill button. When pressed it gives on a spring and barely bounces back; round ones give more. Try pressing them.
import { Button } from '@bilursag/solidui-react'
light
Variants
Sizes (36 · 44 · 52 · 56 px)
States
Full width (block)
dark
Variants
Sizes (36 · 44 · 52 · 56 px)
States
Full width (block)
PropTypeDefaultDescription
variant'primary' | 'secondary' | 'surface' | 'ghost' | 'destructive' | 'link''primary'Visual style. One primary action per view.
size'xs' | 'sm' | 'md' | 'lg' | 'icon' | 'icon-sm''md'Control height. icon and icon-sm are round and need an aria-label.
blockbooleanfalseTakes the full available width.
loadingbooleanfalseSpinner, disabled and aria-busy, without changing the width. The label fades out as the spinner grows in.
asChildbooleanfalseApplies the styles to the child (a router <Link>, for instance).
Example
<Button size="lg" block loading={paying} onClick={pay}>
  <ShoppingBag /> Checkout
</Button>

<Button asChild variant="surface">
  <Link href="/orders">View orders</Link>
</Button>

// React Native (@bilursag/solidui-native): icons are components
<Button size="lg" block leftIcon={ShoppingBagIcon} loading={paying} onPress={pay}>
  Checkout
</Button>
Components

Input and Field

A gray fill with no border; on focus it becomes a raised surface with a focus ring. Field wires the label, hint and error to screen readers.
import { Input, Field } from '@bilursag/solidui-react'
light

At least 8 characters.

dark

At least 8 characters.

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Height: 44 · 52 · 56 px.
leading / trailingReactNode—An icon or small button at the start or end (show password, for instance).
invalidboolean—Error ring. Inside <Field error> it turns on by itself.
classNamestring—Goes to the wrapper; the <input> inherits its typography (font-mono, uppercase…).
Field.label / hint / errorReactNode—Label, hint and error, connected through id and aria-describedby.
Field.optionalboolean | ReactNode—true shows "(optional)" next to the label; pass text to translate it.
Example
<Field label="Email" hint="We'll send the receipt here." error={errors.email}>
  <Input type="email" leading={<Mail />} {...register('email')} />
</Field>

<Field label="Código" optional="(opcional)">
  <Input />
</Field>
Components

Card

A surface with a large radius and a soft shadow, no border. muted groups things inside another card; brand highlights; interactive lifts and gives when pressed.
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@bilursag/solidui-react'
light

Default

Surface with a soft shadow.

Muted

For grouping inside another card.

Brand

Highlights in the brand color.

Interactive

Hover and press it.

dark

Default

Surface with a soft shadow.

Muted

For grouping inside another card.

Brand

Highlights in the brand color.

Interactive

Hover and press it.

PropTypeDefaultDescription
variant'default' | 'muted' | 'brand''default'Surface with shadow, gray fill, or brand color.
padding'none' | 'sm' | 'md' | 'lg''md'Padding and gap between children: 16 · 24 · 32 px.
interactivebooleanfalseLifts on hover and gives when pressed. Use it with asChild + a link.
asChildbooleanfalseRenders the child with the card styles.
Example
<Card interactive asChild>
  <Link href={`/products/${product.id}`}>
    <CardHeader>
      <CardTitle>{product.name}</CardTitle>
      <CardDescription>{product.price}</CardDescription>
    </CardHeader>
  </Link>
</Card>

// React Native: pass onPress and the card becomes pressable
<Card onPress={() => router.push(`/products/${product.id}`)}>…</Card>
Components

Badge

Status pills. States use the token's tint + ink, never raw Tailwind colors, so they work in light and dark.
import { Badge } from '@bilursag/solidui-react'
light
Neutral
FeaturedMusicDraftArchived
States
PaidPendingCancelled
With an icon
2 items Sent
dark
Neutral
FeaturedMusicDraftArchived
States
PaidPendingCancelled
With an icon
2 items Sent
PropTypeDefaultDescription
variant'default' | 'brand' | 'secondary' | 'outline' | 'success' | 'warning' | 'danger''default'Color. 'destructive' is an alias of 'danger' (shadcn compatibility).
asChildbooleanfalseApplies the styles to the child (a link, for instance).
Example
<Badge variant={order.status === 'PAID' ? 'success' : 'warning'}>{label}</Badge>

// React Native: same variants, icon as a component
<Badge variant="brand" icon={ShoppingBagIcon}>2 items</Badge>
Components

QuantityStepper

A − value + control. The number rolls up or down with the change. At a limit the button looks disabled but still answers with a short shake (and a warning buzz on phones), so people see why the number stops. Try going past 1 or 10.
import { QuantityStepper } from '@bilursag/solidui-react'
light
1 to 10
2
Small · step 5 · no limit
0
Disabled
3
dark
1 to 10
2
Small · step 5 · no limit
0
Disabled
3
PropTypeDefaultDescription
value / defaultValuenumberminControlled or uncontrolled value.
onValueChange(value: number) => void—Called with the new value after each change.
min / maxnumber0 / InfinityLimits. At a limit the button shakes the number instead of changing it.
stepnumber1How much each press adds or removes.
size'sm' | 'md''md'Button size icon-sm or icon, number in heading or title type.
variant'secondary' | 'surface''secondary'Button style. Use surface on gray backgrounds, such as a muted card.
decrementLabel / incrementLabelstring'Decrease' / 'Increase'Accessible names of the buttons; translate them. Name the group with aria-label.
decrementIcon / incrementIconReactNode− / +Your own icons.
Example
<QuantityStepper
  value={tickets}
  onValueChange={setTickets}
  min={1}
  max={10}
  aria-label="Tickets"
  decrementLabel="Remove one"
  incrementLabel="Add one"
/>

// React Native (@bilursag/solidui-native): one "adjustable" element for
// VoiceOver and TalkBack, with a selection tick on each change (haptics={false} to turn it off)
<QuantityStepper value={tickets} onValueChange={setTickets} min={1} max={10} accessibilityLabel="Tickets" />
Patterns

Checkout

The components together, the way a product page would use them: a card with media, a quantity stepper, a form and a total.
Only 24 left

Cloud Lamp

Hand-blown glass · Ships in 2 days

Warm white$48 each
2

Your details

We'll send the receipt to this email.

Only used for your receipt.

Total$96.00