Overview
Luminescent UI provides border utilities for creating smooth, superellipse-based rounded corners and gradient borders.rounded-lum
Applies the Luminescent border radius with superellipse corner smoothing.CSS Implementation
Usage
CSS Variables
The border radius value. Typically corresponds to Tailwind’s
lg size (~8px).Superellipse corner smoothing factor:
0= Perfect circle1= Squircle (smooth, Apple-style corners)2+= Approaching rounded square
The
corner-shape: superellipse() property creates smoother, more aesthetically pleasing corners than standard border-radius. This is the same corner style used by Apple in iOS and macOS.rounded-lum-*
Applies a calculated border radius that’s reduced by a spacing multiplier, useful for nested elements.CSS Implementation
Usage
Values
Radius reduced by 1 spacing unit (~4px)
Radius reduced by 2 spacing units (~8px)
Radius reduced by 3 spacing units (~12px)
Radius reduced by 4 spacing units (~16px)
Use
rounded-lum-* utilities when you have nested rounded containers. This ensures the inner element’s corners align perfectly with the outer element’s corners by accounting for the padding.border-gradient-*
Creates a gradient border effect using a pseudo-element.CSS Implementation
Usage
Border Widths
1px gradient border
2px gradient border (recommended)
3px gradient border
4px gradient border
How It Works
- Sets a transparent border with the specified width
- Creates a
::beforepseudo-element behind the content - Applies a gradient background to the pseudo-element
- Offsets the pseudo-element by negative margin to show through the transparent border
- Inherits the border-radius for consistent corner shapes
Customizing Gradients
The default gradient isbg-gradient-to-br (bottom-right diagonal). You can customize it:
Examples
Superellipse Corner Shape
Thecorner-shape: superellipse() property creates smoother corners:
Best Practices
- Use
rounded-lumfor all Luminescent UI components to maintain consistency - Use
rounded-lum-*for nested elements to align inner corners with outer corners - Always set a background color when using
border-gradient-* - Consider combining
border-gradient-*with hover effects for interactive elements - Keep
--lum-border-superellipseat1for the signature Luminescent look - Use gradient borders sparingly to highlight important or premium elements
- Ensure gradient colors have sufficient contrast with the background