GlossyButton

GlossyButton is an animated glossy button component for React Native and React, from the dissolve library. Tactile pill lit from the inside: gradient stroke, inner light and ring, presses down on a crisp spring.

A pill button with a slightly 3D look, built from one recipe: a 1 pt inside stroke as a white gradient lit from the top, a soft black drop shadow, a white inner shadow and a thin outer ring in the fill color. Pressed, it scales to 0.97 on a crisp spring while the inner light dims, with a light haptic. Every layer is a prop, tune them here and copy the JSX.

Install

React Native

Install the engine once per app and wrap the root layout in <DissolveProvider> (see Installation), then copy the component into components/dissolve:

npx expo install dissolve-ui @shopify/react-native-skia react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
npx dissolve-ui add glossy-button --native
npx shadcn@latest add https://dissolve.rselmi.com/r/native/glossy-button.json

React

Needs React 19 and react-dom, nothing else: no engine, no provider, no Tailwind. Works in the Next.js App Router.

npx dissolve-ui add glossy-button --web
npx shadcn@latest add https://dissolve.rselmi.com/r/glossy-button.json

Usage

GlossyButton.tsx (React Native)
import { GlossyButton } from '@/components/dissolve/glossy-button';

<GlossyButton onPress={start}>Get started</GlossyButton>

<GlossyButton
  icon={({ color, size }) => <SymbolView name="plus" tintColor={color} size={size} />}
  onPress={create}
>
  New project
</GlossyButton>

<GlossyButton color="#E5484D" radius={14} size="lg" onPress={remove}>
  Delete
</GlossyButton>
GlossyButton.tsx (React)
import { GlossyButton } from '@/components/dissolve/glossy-button';

<GlossyButton onPress={start}>Get started</GlossyButton>

<GlossyButton
  icon={({ color, size }) => <Icon name="plus" color={color} size={size} />}
  onPress={create}
>
  New project
</GlossyButton>

<GlossyButton color="#E5484D" radius={14} size="lg" onPress={remove}>
  Delete
</GlossyButton>

Props

PropTypeDefaultDescription
children / labelReactNode / stringThe label. A string is styled with labelColor, any other node renders as is.
iconReactNode | ({ color, size }) => ReactNodeLeading icon. The function form gets the label color and the icon size.
onPress() => voidCalled on release.
colorstring'#296FF0'Fill, also the color of the outer ring.
labelColorstring'#FFFFFF'Label and icon color.
radiusnumber999Corner radius, capped at half the height (a pill).
size'sm' | 'md' | 'lg''md'Height 36, 44 or 52, with matching padding and type.
fullWidthbooleanfalseStretches to the full width of the parent.
strokeOpacitynumber0.4Top opacity of the 1 pt white gradient stroke, fading to 0 at the bottom.
innerOpacity / innerBlur / innerSpreadnumber0.24 / 6 / 2White inner shadow. Dims while pressed.
shadowOpacity / shadowY / shadowBlurnumber0.2 / 3 / 6Black drop shadow.
ringSpreadnumber1Outer ring in the fill color, no blur. 0 removes it.
disabledbooleanfalseHalf opacity, no press, no haptic.
hapticsbooleantrueLight impact on press in.
classNamestringOuter classes (margins, alignment, width...).
labelClassNamestringLabel classes (weight, tracking...).

Source

Previous: Toast · Next: LikeButton · All components

dissolve is MIT licensed. Source on GitHub, package on npm. This page as markdown. For AI agents: llms.txt.