> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Theming & styling for Box UI Elements

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

<RelatedLinks
  title="REQUIRED GUIDES"
  items={[
{ label: translate("Installation"), href: "/guides/embed/ui-elements/installation", badge: "GUIDE" }
]}
/>

With theming & styling for Box UI Elements you can customize the look
of the embedded Box component to your enterprise's requirements.

<Note>
  As of now, [theming & styling][blog] is available for Content
  Explorer and Content Uploader.
</Note>

## How to start

Add the selected Box component to your application. The default Box theme is applied.

## Customization

Box uses <Link href="/guides/embed/ui-elements/ui-elements-design-tokens">design tokens</Link> for the customization purposes.

<Note>
  Design tokens are named entities that store specific visual attributes, such
  as colors, spacing, typography, scale, and many more.
  They are used instead of hard-coded values to simplify sharing design
  properties across platforms, tools, and components.
</Note>

You can change the following elements in your embedded Box component.

### Colors

Customize:

* global color palette - select the primary, secondary, and accent colors
* state colors - select color for states such as hover, focus, active, disabled
* component-specific colors - for example, you can select different colors for your buttons depending on their type

- gradients - choose and adjust a gradient as your background or other components
- opacity - adjust the opacity of the overlay effects for Box Modals and side panels

### Typography

Customize:

* text decoration - underline, strikethrough, letter spacing
* line heights and paragraph spacing

### Border, radius

Choose:

* border styling - width, styles, and colors
* border radius

### Spacing

Choose:

* global spacing
* component-specific spacing
* component-specific alignment and distribution, for example justify-content

### Shadows and elevation

Define:

* shadow presets
* custom shadows

### Interactive states

Customize:

* hover, active, focus, disabled, and error states - visual effect such as changed background color
* transitions and animations

### Component-level overrides

Customize text input, drop down, and checkboxes with individual color

### Icons

Style interactive icons such as buttons or drop downs.

<Note>
  To replace non-interactive icons such as file or folder icons with your custom ones, use inline SVGs in CSS.
  To change non-interactive icons color, height, and width, use CSS.
</Note>

See the implemented examples of custom icons in CodePen:

<iframe height="560" scrolling="no" title="Box custom icons" src="https://codepen.io/box-platform/embed/raaRqye?default-tab=html%2Cresult" frameborder="no" allowtransparency="true" allowfullscreen="true" style={{width: "100%"}} />

### Miscellaneous

Style:

* help text and labels
* tool tips

## Demo

<iframe height="560" scrolling="no" title="Box theming branding" src="https://codepen.io/box-platform/embed/KwKbrPw?default-tab=html%2Cresult" frameborder="no" allowtransparency="true" allowfullscreen="true" style={{width: "100%"}} />

[explorer]: /guides/embed/ui-elements/explorer

[uploader]: /guides/embed/ui-elements/uploader

[blog]: https://medium.com/@stefaniuk.olga/b4a86518d5ca

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("UI Elements"), href: "/guides/embed/ui-elements/index", badge: "GUIDE" },
{ label: translate("Content Explorer"), href: "/guides/embed/ui-elements/explorer", badge: "GUIDE" },
{ label: translate("Content Uploader"), href: "/guides/embed/ui-elements/uploader", badge: "GUIDE" }
]}
/>
