ButtonsNew

Texture Button

A button with a layered border and a soft gradient that feels like a real key. Comes in primary, secondary, minimal and icon variants.

Customize

color
secondaryColor
highlightColor

Based on Texture Button (MIT license) · Terms of use

More in Pro

View all

Props

8 properties
PropertyTypeDefaultDescription
variant'primary' | 'secondary' | 'accent' | 'destructive' | 'minimal' | 'icon'"primary"Button style.
size'default' | 'sm' | 'lg' | 'icon'"default"Button size.
asChildbooleanfalsePass the styles to the child element, e.g. a link.
childrenReactNode—Button text and icons.
classNamestring—Extra classes.
colorstring"#f5f5f5"Surface color of the button. Text turns dark or white on its own.
secondaryColorstring"#d4d4d4"Lower color of the gradient and the rim tint.
highlightColorstring"rgba(255,255,255,0.8)"Thin sheen along the top edge.

Dependencies

4 required packages

npm install @radix-ui/react-slot class-variance-authority clsx tailwind-merge

Related components

View all