Skip to main content

Designs

Every component ships in the Patine design: one refined look, the same on iPhone, Android and the web. It's what this site, the screenshots and the Pro screens show, and you don't write anything for it.

Behaviour follows the platform whatever the design: fields open a bottom sheet on phones and a dropdown in the browser, sheets leave room for the home indicator, and the web gets keyboard, hover and focus. So the Patine design looks the same everywhere and still feels native.

If your app should look like each platform instead, set design="native": iOS on iPhone and iPad, Material Design on Android, and a web design in the browser, from the same code.

<PatineProvider design="native">
<App />
</PatineProvider>

A design changes shapes and layout: where Cancel and Done sit, how a field and a chosen day look, whether time is picked on wheels, a clock dial or columns. It never changes your colors, fonts or anything you set yourself. Switch between the three native designs here:

Behaves like
Loading…
<View style={{ gap: 16 }}>
  <SegmentedControl
    items={DESIGNS}
    value={design}
    onValueChange={setDesign}
  />
  <DatePickerField
    design={design}
    label="Date"
    value={date}
    onConfirm={setDate}
  />
  <TimePicker
    design={design}
    value={time}
    onValueChange={setTime}
  />
</View>

What each design changes​

The three native designs side by side. The Patine design ('brand') is closest to web in layout, with fields and rows sized for fingers (44pt) and its own radii and shadows.

iosmaterialweb
Fieldslabel above, 48 talloutlined, 56 tall; the label sits inside, then floats onto the borderlabel above, 40 tall, focus ring while open
Sheet corners242812
Cancel / confirmbeside a centered title, Doneafter the content, OKafter the content, Done
Single select✓ beside the chosen optiona radio on every option✓ beside the chosen option
Option rowsrounded and tinted when chosenedge to edge, untintedcompact, rounded and tinted
Calendarchosen day tinted, today's number coloured, SUN MONchosen day filled, today ringed, S M Tchosen day a filled square, today shaded, Sun Mon
Date sheetcalendarthe picked date in large type above the calendarcalendar
Timewheelsa clock dialcolumns of hours and minutes to click
Date & timeone row of wheelscalendar with time fields to type into under itcalendar with the time columns beside it
Time rangeStart and End rows, the wheels opening under the one you taptwo large time boxes with an arrow and the length, a clock dial for the chosen endtwo cards side by side with an arrow and the length, columns for the chosen end
Durationwheels with unitsnumber boxes to type intocolumns to click
Monthmonth and year wheelsa grid of months under the yeara grid of months under the year
WeekStripchosen day tinted, SUN MONchosen day filled, S M Tchosen day a filled square, Sun Mon
ColourGrid, Spectrum and Sliders tabs, swatches in a row to scrollswatch circles, then Custom for a saturation square and hue slidera saturation square, eyedropper, hue slider and hex code, then swatches
Slidera white knob on a thin tracka slim handle with gaps on a thick track, stop dots, a value bubble while dragginga solid dot on a medium track, a halo on hover and press
InputOTPbordered boxes, the focused one in the primary colouroutlined boxes, the focused one with a 2dp primary outlinecompact outlined boxes, the focused one with a focus ring
Ratinggold ★ starsgold ★ starsgold ★ stars; the pointer previews the rating a click would pick
DropdownMenu250 px wide, icons after the label, hairlines between actions, a small centered title200 px, icons first, 48 px rows200 px, icons first, compact 36 px rows
ActionSheetcentered actions in a floating rounded card, Cancel in its own cardrows on the sheet with icons, no Cancelrows, a centered modal on wide windows, no Cancel
SegmentedControl, ChipGroupa sliding raised thumb; filled chipsoutlined segments and chips, the chosen one filled with a ✓a sliding raised thumb; filled chips
Search fieldsa short gray search bara tall pillan outlined input with a focus ring
EmojiPickercategories at the bottom, the current one on a gray fill, UPPERCASE titlescategories at the bottom, the current one in a tinted pillcategories on top, underlined
Pressdims while held; buttons and chips shrink to 97% and spring back (brand too)ripple from the touch point, no shrinkdims while held; buttons and chips shrink to 98%

CountryPicker and TimeZonePicker are Selects and PhoneField is a field, so they follow the Fields, Single select and Option rows lines.

design="native" picks ios on iOS, web on the web, and material everywhere else (Android, Windows, macOS). The default, design="brand", is the Patine design on every platform. Every component's design prop takes the same values, 'native' included, and wins over the provider's: <Select design="native" … /> draws the platform's own select inside a Patine-designed screen.

One design everywhere​

Set design on the provider to use one look on every platform. To keep the iOS look on Android and the web:

<PatineProvider design="ios">
<App />
</PatineProvider>

Or Material everywhere, for an app built on Material Design:

<PatineProvider design="material">
<App />
</PatineProvider>

One component​

design on a component wins over the provider's. A field passes its design to the sheet it opens.

<Select design="material" options={options} value={value} onValueChange={setValue} />
<TimePickerField design="ios" label="Alarm" value={time} onConfirm={setTime} />

Only part of a design​

Some choices a design makes are props of their own, so you can keep the rest of a design and change just that:

To getSet
Wheels for time in any designdisplay="wheel" on TimePicker
A clock dial, typed fields or columnsdisplay="dial", "input" or "list" on TimePicker
One row of date and time wheelsdisplay="wheel" on DateTimePicker
A calendar with time wheelsdisplay="calendar" and timeDisplay="wheel" on DateTimePicker
The time beside or under the calendartimePosition="beside" or "below" on DateTimePicker
Mon instead of MweekdayFormat="short" on DatePicker
Your own button labelsconfirmLabel / cancelLabel on any sheet or field

Customize a design​

A design is a starting point. Everything you set wins over it:

  • Theme tokens. theme and darkTheme on PatineProvider (colors, radius, spacing, fonts) are merged on top of the design's tokens. radius.sheet sets sheet corners in every design. See Theming.
  • Slot styles. Every visual part takes a style through styles. See Styling with slots.
  • Render props. Replace a row, a day, a trigger or a chevron and keep the behavior. See Render props.
  • Explicit props. confirmLabel, weekdayFormat, display and the others above always win over the design's defaults.

DESIGN_TOKENS shows exactly what each design changes on the light or dark theme. In your own components, useTheme().design tells you which design to match:

const theme = useTheme();
const radius = theme.design === 'material' ? theme.radius.full : theme.radius.md;

Previewing other platforms​

design sets the look. To also see how pickers behave on another platform in a browser (fields opening a bottom sheet instead of a dropdown, room for the iOS home indicator), set platform on the provider. See Previewing other platforms. On this site, the Examples: Patine / Native toggle at the top of each component page switches the look of every example, and the Behaves like iOS / Android / Web switch, on the examples whose behaviour changes by platform, switches the behaviour (and, with Native, the look).