Skip to main content

Overview

Learn advanced customization techniques for modifying Hux UI components beyond the standard theming system. This guide covers component wrapping, style overrides, composition patterns, and creating custom variants.

Component Wrapping

Wrapping with Decorators

Wrap Hux components with additional styling or behavior:

Custom Padding and Margins

Add custom spacing around components:

Style Overrides

Using Theme Extensions

Override component styles through theme extensions:

Custom Color Overrides

Override colors on individual components:

Composition Patterns

Building Custom Components

Create reusable components by composing Hux UI components:

Custom Form Fields

Create specialized input components:

Custom Variants

Creating Button Variants

Extend button functionality with custom variants:

Custom Card Variants

Create specialized card components:

Advanced Styling

Custom Animations

Add custom animations to components:

Conditional Styling

Apply styles based on state or conditions:

Best Practices

Prefer wrapping and composing components rather than modifying their internals:
Create reusable wrapper components for common patterns:
Always use HuxTokens for colors to maintain theme consistency:
Maintain accessibility when customizing:

Examples

Component Composition

See how to compose multiple Hux components

Custom Variants

Learn to create custom component variants

Theming Guide

Basic theming and design tokens

Advanced Theming

Deep dive into advanced theming