> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-fix-docs-5525.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Organization Details on Web

> Edit organization details including name, display name, branding colors, and logo.

export const ReleaseStageNotice = ({feature, stage, plans, contact, terms}) => {
  const stageTextMap = {
    "beta": "Beta",
    "ea": "Early Access"
  };
  const stageText = stageTextMap[stage] || "a product release stage";
  const prsLink = "/docs/troubleshoot/product-lifecycle/product-release-stages";
  const linkify = (text, url) => {
    return <a href={url} target="_blank" rel="noreferrer" class="link">{text}</a>;
  };
  const includeDetails = (plans, contact, terms) => {
    const hasDetails = terms || plans || contact;
    if (!hasDetails) return null;
    return <span data-as="p">
            {plans && <>This feature is available for {linkify(`${plans} plans`, "https://auth0.com/pricing")}. </>}
            {contact && "To participate, contact " + contact + ". "}
            {terms && <>By using this feature, you agree to the applicable Free Trial terms in Okta's {linkify("Master Subscription Agreement", "https://www.okta.com/legal")}.</>}
        </span>;
  };
  return <Warning>
            <span data-as="p">
                <strong>The {feature} feature is in {linkify(stageText, prsLink)}.</strong>
            </span>

            {includeDetails(plans, contact, terms)}
        </Warning>;
};

export const ComponentLoader = props => {
  const themePref = window?.localStorage?.getItem?.("isDarkMode");
  const theme = themePref === "dark" || themePref === "light" ? themePref : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
  const lang = {
    i18n: {
      currentLanguage: props.lang || "en-US"
    }
  };
  return <div style={{
    minHeight: "400px",
    marginTop: "40px",
    background: theme === "light" ? "rgb(var(--gray-950)/.03)" : "rgb(255 255 255/.1)",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    position: "relative",
    backgroundSize: "16px 16px",
    borderRadius: "10px",
    boxShadow: "0 1px 4px 0 rgba(16,30,54,0.04)",
    display: "flex",
    flexDirection: "column"
  }}>
      <div style={{
    minWidth: "320px",
    width: "96.5%",
    maxWidth: "1200px",
    margin: "12px 12px 0",
    background: theme === "light" ? "#ffffff" : "#101011",
    borderRadius: "10px",
    boxShadow: "0 2px 8px 0 rgba(16,30,54,0.04)",
    padding: "24px",
    minHeight: "400px"
  }} data-uc-component={props.componentSelector} data-uc-props={JSON.stringify(lang)}>
        <Spinner size={40} color="#8A94A6" style={{
    position: "absolute",
    top: "50%",
    left: "50%",
    transform: "translate(-50%, -50%)",
    zIndex: 1
  }} />
      </div>
      <div style={{
    width: "100%",
    textAlign: "center",
    color: theme === "light" ? "#6B7280" : "ffffff",
    fontSize: "12px",
    marginTop: "8px",
    marginBottom: "8px",
    letterSpacing: "0.01em",
    fontWeight: 400
  }}>
        {props.componentPreviewText}
      </div>
    </div>;
};

export const Spinner = ({size = 40, color = "#8A94A6", style = {}}) => <div style={{
  display: "flex",
  alignItems: "center",
  justifyContent: "center",
  ...style
}} aria-label="Loading" role="status">
    <svg width={size} height={size} viewBox="0 0 50 50" style={{
  display: "block"
}}>
      <circle cx="25" cy="25" r="20" fill="none" stroke={color} strokeWidth="5" strokeDasharray="90 150" strokeLinecap="round">
        <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite" />
      </circle>
    </svg>
  </div>;

<ReleaseStageNotice feature="Auth0 Universal Components" stage="ea" terms="true" contact="Auth0 Support" />

The `OrganizationDetailsEdit` component provides a unified interface to edit your [organization](/docs/manage-users/organizations) details.

<ComponentLoader componentSelector="organization-details-edit" componentPreviewText="Preview of the Organization Details Edit component" />

<Tabs>
  <Tab title="React">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#enable-the-my-organization-api)
    </Callout>

    ## Installation

    <CodeGroup>
      ```bash pnpm  wrap lines theme={null}
      pnpm add @auth0/universal-components-react
      ```

      ```bash npm wrap lines theme={null}
      npm install @auth0/universal-components-react
      ```
    </CodeGroup>

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running either command also installs the @auth0/universal-components-core
      dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx wrap lines theme={null}
    import { OrganizationDetailsEdit } from "@auth0/universal-components-react";
    import { useNavigate } from "react-router-dom";

    export function OrganizationSettingsPage() {
      const navigate = useNavigate();

      return (
        <OrganizationDetailsEdit
          saveAction={{
            onAfter: () => navigate("/organization"),
          }}
          backButton={{
            onClick: () => navigate("/organization"),
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { OrganizationDetailsEdit } from "@auth0/universal-components-react";
      import { Auth0Provider } from "@auth0/auth0-react";
      import { Auth0ComponentProvider } from "@auth0/universal-components-react/spa";
      import { useNavigate } from "react-router-dom";
      import { analytics } from "./lib/analytics";

      function OrganizationSettingsPage() {
        const navigate = useNavigate();

        const handleSaveSuccess = (org) => {
          analytics.track("Organization Updated", {
            name: org.name,
            displayName: org.display_name,
          });
          navigate("/organization");
        };

        return (
          <div className="max-w-2xl mx-auto p-6">
            <OrganizationDetailsEdit
              schema={{
                details: {
                  displayName: {
                    required: true,
                    maxLength: 100,
                  },
                  color: {
                    regex: /^#[0-9A-Fa-f]{6}$/,
                    errorMessage: "Enter a valid hex color",
                  },
                },
              }}
              saveAction={{
                onBefore: (org) => {
                  return confirm(`Save changes to "${org.display_name}"?`);
                },
                onAfter: handleSaveSuccess,
              }}
              cancelAction={{
                onBefore: () => confirm("Discard unsaved changes?"),
                onAfter: () => navigate("/organization"),
              }}
              backButton={{
                onClick: () => navigate("/organization"),
              }}
              customMessages={{
                header: {
                  title: "Organization Settings",
                },
                notifications: {
                  save_success: "Settings saved successfully!",
                },
              }}
              styling={{
                variables: {
                  common: {
                    "--color-primary": "#059669",
                  },
                },
                classes: {
                  "OrganizationDetailsEdit-form": "shadow-xl rounded-lg",
                },
              }}
            />
          </div>
        );
      }

      export default function App() {
        const domain = "your-domain.auth0.com";
        const clientId = "your-client-id";

        return (
          <Auth0Provider
            domain={domain}
            clientId={clientId}
            authorizationParams={{
              redirect_uri: window.location.origin,
            }}
            interactiveErrorHandler="popup" // Required to handle step-up auth challenges via Universal Login popup
          >
            <Auth0ComponentProvider domain={domain}>
              <OrganizationSettingsPage />
            </Auth0ComponentProvider>
          </Auth0Provider>
        );
      }

      ```
    </Accordion>

    ## Props

    ### Required props

    Required props are fundamental to the component's operation. `OrganizationDetailsEdit` has no required props—it automatically loads the current organization's details from the My Organization API.

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior. Use these to hide sections or enable read-only mode.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>readOnly</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Disable all form inputs. Default: <code>false</code>
          </td>
        </tr>

        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    Action props handle user interactions and define what happens when users save or cancel changes. Use lifecycle hooks (`onBefore`, `onAfter`) to integrate with your application's routing and analytics.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>saveAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Save changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>cancelAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Cancel/discard changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>
      </tbody>
    </table>

    **saveAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the save flow when users submit organization changes. Use `onAfter` to navigate away after successful save.

    **Properties:**

    * `disabled`—Disable the save button (for example, while another operation is in progress)
    * `onBefore(data)`—Runs before the save operation. Return `false` to prevent saving (for example, to show a confirmation dialog first).
    * `onAfter(data)`—Runs after the organization is successfully saved. Use this to navigate away or track the event.

    **Example:**

    ```tsx wrap lines theme={null}
    // Navigate back after saving
    saveAction={{
      onAfter: () => navigate("/organization"),
    }}

    // Add confirmation before saving
    saveAction={{
      onBefore: (org) => {
        return confirm(`Save changes to "${org.display_name}"?`);
      },
      onAfter: () => navigate("/organization"),
    }}

    // Track analytics on save
    saveAction={{
      onAfter: (org) => {
        analytics.track("Organization Updated", {
          name: org.name,
          displayName: org.display_name,
        });
        navigate("/organization");
      },
    }}
    ```

    ***

    **cancelAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the cancel/discard flow. Use this action to manage discarded changes.

    **Properties:**

    * `disabled`—Disable the cancel button
    * `onBefore(data)`—Runs before the cancel action. Return `false` to prevent cancellation (for example, to confirm discarding unsaved changes).
    * `onAfter(data)`—Runs after the cancel is confirmed. Use this to navigate away from the form.

    **Example:**

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      cancelAction={{
        onBefore: (org) => {
          return confirm("Discard unsaved changes?");
        },
        onAfter: () => navigate("/organization"),
      }}
    />
    ```

    ***

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your organization overview or the previous page.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <OrganizationDetailsEdit
      backButton={{
        icon: ChevronLeft,
        onClick: () => navigate("/organization"),
      }}
    />;
    ```

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>OrganizationDetailsEditSchemas</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<OrganizationDetailsEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<OrganizationEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for organization detail fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **details.name**—Organization internal name
      **details.displayName**—Organization display name
      **details.color**—Brand color (hex format)
      **details.logoURL**—Logo URL
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      schema={{
        details: {
          name: {
            minLength: 3,
            maxLength: 50,
            regex: /^[a-zA-Z0-9-_]+$/,
            errorMessage: "Name must be alphanumeric with hyphens/underscores",
          },
          displayName: {
            required: true,
            maxLength: 100,
          },
          color: {
            regex: /^#[0-9A-Fa-f]{6}$/,
            errorMessage: "Enter a valid hex color (e.g., #FF5500)",
          },
          logoURL: {
            regex: /^https:\/\/.+/,
            errorMessage: "Logo URL must use HTTPS",
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `description`, `back_button_text`

      **form**—Form fields

      * `fields.name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.display_name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.color`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.logo_url`—`label`, `placeholder`, `helper_text`, `error`

      **actions**—Button labels

      * `save_button_text`, `cancel_button_text`

      **notifications**—API responses

      * `save_success`, `save_error`, `general_error`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      customMessages={{
        header: {
          title: "Edit Organization",
          description: "Update your organization's settings",
        },
        form: {
          fields: {
            name: {
              label: "Organization ID",
              helper_text: "Internal identifier (cannot be changed after creation)",
            },
            display_name: {
              label: "Organization Name",
              placeholder: "Enter display name",
            },
          },
        },
        notifications: {
          save_success: "Organization updated successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `OrganizationDetailsEdit-header`
      * `OrganizationDetailsEdit-form`
      * `OrganizationDetailsEdit-actions`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "OrganizationDetailsEdit-form": "shadow-lg rounded-xl p-6",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `OrganizationDetailsEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom organization editing workflows if you use shadcn.

    ### Available subcomponents

    For advanced use cases, you can import individual subcomponents to build custom organization editing interfaces.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>OrganizationForm</code>
          </td>

          <td>Main form component with all fields</td>
        </tr>

        <tr>
          <td>
            <code>ColorPickerField</code>
          </td>

          <td>Brand color selection field</td>
        </tr>

        <tr>
          <td>
            <code>LogoUploadField</code>
          </td>

          <td>Logo URL input with preview</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useOrganizationDetailsEdit</code>
          </td>

          <td>Organization editing logic and API integration</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Next.js">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#configure-auth0-dashboard)
    </Callout>

    ## Installation

    <CodeGroup>
      ```bash npm (Recommended) wrap lines theme={null}
      npm install @auth0/universal-components-react
      ```

      ```bash pnpm wrap lines theme={null}
      pnpm add @auth0/universal-components-react
      ```
    </CodeGroup>

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running the npm or pnpm commands installs the @auth0/universal-components-core
      dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx page.tsx wrap lines theme={null}
    import { OrganizationDetailsEdit } from "@auth0/universal-components-react";
    import { useRouter } from "next/navigation";

    export function OrganizationSettingsPage() {
      const router = useRouter();

      return (
        <OrganizationDetailsEdit
          saveAction={{
            onAfter: () => router.push("/organization"),
          }}
          backButton={{
            onClick: () => router.push("/organization"),
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { OrganizationDetailsEdit } from "@auth0/universal-components-react";
      import { useRouter } from "next/navigation";
      import { analytics } from "./lib/analytics";

      function OrganizationSettingsPage() {
        const router = useRouter();

        const handleSaveSuccess = (org) => {
          analytics.track("Organization Updated", {
            name: org.name,
            displayName: org.display_name,
          });
          router.push("/organization");
        };

        return (
          <div className="max-w-2xl mx-auto p-6">
            <OrganizationDetailsEdit
              schema={{
                details: {
                  displayName: {
                    required: true,
                    maxLength: 100,
                  },
                  color: {
                    regex: /^#[0-9A-Fa-f]{6}$/,
                    errorMessage: "Enter a valid hex color",
                  },
                },
              }}
              saveAction={{
                onBefore: (org) => {
                  return confirm(`Save changes to "${org.display_name}"?`);
                },
                onAfter: handleSaveSuccess,
              }}
              cancelAction={{
                onBefore: () => confirm("Discard unsaved changes?"),
                onAfter: () => router.push("/organization"),
              }}
              backButton={{
                onClick: () => router.push("/organization"),
              }}
              customMessages={{
                header: {
                  title: "Organization Settings",
                },
                notifications: {
                  save_success: "Settings saved successfully!",
                },
              }}
              styling={{
                variables: {
                  common: {
                    "--color-primary": "#059669",
                  },
                },
                classes: {
                  "OrganizationDetailsEdit-form": "shadow-xl rounded-lg",
                },
              }}
            />
          </div>
        );
      }

      export default OrganizationSettingsPage;
      ```
    </Accordion>

    ## Props

    ### Core props

    Core props are fundamental to the component's operation. `OrganizationDetailsEdit` has no required props—it automatically loads the current organization's details from the My Organization API.

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior. Use these to hide sections or enable read-only mode.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>readOnly</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Disable all form inputs. Default: <code>false</code>
          </td>
        </tr>

        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    Action props handle user interactions and define what happens when users save or cancel changes. Use lifecycle hooks (`onBefore`, `onAfter`) to integrate with your application's routing and analytics.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>saveAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Save changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>cancelAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Cancel/discard changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>
      </tbody>
    </table>

    **saveAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the save flow when users submit organization changes. Use `onAfter` to navigate away after successful save.

    **Properties:**

    * `disabled`—Disable the save button (for example, while another operation is in progress)
    * `onBefore(data)`—Runs before the save operation. Return `false` to prevent saving (for example, to show a confirmation dialog first).
    * `onAfter(data)`—Runs after the organization is successfully saved. Use this to navigate away or track the event.

    **Common Patterns:**

    ```tsx wrap lines theme={null}
    // Navigate back after saving
    saveAction={{
      onAfter: () => router.push("/organization"),
    }}

    // Add confirmation before saving
    saveAction={{
      onBefore: (org) => {
        return confirm(`Save changes to "${org.display_name}"?`);
      },
      onAfter: () => router.push("/organization"),
    }}

    // Track analytics on save
    saveAction={{
      onAfter: (org) => {
        analytics.track("Organization Updated", {
          name: org.name,
          displayName: org.display_name,
        });
        router.push("/organization");
      },
    }}
    ```

    ***

    **cancelAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the cancel/discard flow. Use this action to manage discarded changes.

    **Properties:**

    * `disabled`—Disable the cancel button
    * `onBefore(data)`—Runs before the cancel action. Return `false` to prevent cancellation (for example, to confirm discarding unsaved changes).
    * `onAfter(data)`—Runs after the cancel is confirmed. Use this to navigate away from the form.

    **Example:**

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      cancelAction={{
        onBefore: (org) => {
          return confirm("Discard unsaved changes?");
        },
        onAfter: () => router.push("/organization"),
      }}
    />
    ```

    ***

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your organization overview or the previous page.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <OrganizationDetailsEdit
      backButton={{
        icon: ChevronLeft,
        onClick: () => router.push("/organization"),
      }}
    />;
    ```

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>OrganizationDetailsEditSchemas</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<OrganizationDetailsEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<OrganizationEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for organization detail fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **details.name**—Organization internal name
      **details.displayName**—Organization display name
      **details.color**—Brand color (hex format)
      **details.logoURL**—Logo URL
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      schema={{
        details: {
          name: {
            minLength: 3,
            maxLength: 50,
            regex: /^[a-zA-Z0-9-_]+$/,
            errorMessage: "Name must be alphanumeric with hyphens/underscores",
          },
          displayName: {
            required: true,
            maxLength: 100,
          },
          color: {
            regex: /^#[0-9A-Fa-f]{6}$/,
            errorMessage: "Enter a valid hex color (e.g., #FF5500)",
          },
          logoURL: {
            regex: /^https:\/\/.+/,
            errorMessage: "Logo URL must use HTTPS",
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `description`, `back_button_text`

      **form**—Form fields

      * `fields.name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.display_name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.color`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.logo_url`—`label`, `placeholder`, `helper_text`, `error`

      **actions**—Button labels

      * `save_button_text`, `cancel_button_text`

      **notifications**—API responses

      * `save_success`, `save_error`, `general_error`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      customMessages={{
        header: {
          title: "Edit Organization",
          description: "Update your organization's settings",
        },
        form: {
          fields: {
            name: {
              label: "Organization ID",
              helper_text: "Internal identifier (cannot be changed after creation)",
            },
            display_name: {
              label: "Organization Name",
              placeholder: "Enter display name",
            },
          },
        },
        notifications: {
          save_success: "Organization updated successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `OrganizationDetailsEdit-header`
      * `OrganizationDetailsEdit-form`
      * `OrganizationDetailsEdit-actions`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "OrganizationDetailsEdit-form": "shadow-lg rounded-xl p-6",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `OrganizationDetailsEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom organization editing workflows.

    ### Available subcomponents

    For advanced use cases, you can import individual subcomponents to build custom organization editing interfaces.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>OrganizationForm</code>
          </td>

          <td>Main form component with all fields</td>
        </tr>

        <tr>
          <td>
            <code>ColorPickerField</code>
          </td>

          <td>Brand color selection field</td>
        </tr>

        <tr>
          <td>
            <code>LogoUploadField</code>
          </td>

          <td>Logo URL input with preview</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useOrganizationDetailsEdit</code>
          </td>

          <td>Organization editing logic and API integration</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="shadcn">
    ## Setup requirements

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      **Auth0 Configuration Required**—Ensure your tenant is configured with the
      My Organization API. [View setup guide
      →](/docs/get-started/universal-components/web/components/build-delegated-admin#configure-auth0-dashboard)
    </Callout>

    ## Installation

    ```bash wrap lines theme={null}
    npx shadcn@latest add https://auth0-universal-components.vercel.app/r/my-organization/organization-details-edit.json
    ```

    <Callout icon="file-lines" color="#0EA5E9" iconType="regular">
      Running the shadcn command also installs the @auth0/universal-components-core
      dependency for shared utilities and Auth0 integration.
    </Callout>

    ## Get started

    ```tsx wrap lines theme={null}
    import { OrganizationDetailsEdit } from "@/components/auth0/my-organization/organization-details-edit";

    export function OrganizationSettingsPage() {
      const navigate = useNavigate();

      return (
        <OrganizationDetailsEdit
          saveAction={{
            onAfter: () => navigate("/organization"),
          }}
          backButton={{
            onClick: () => navigate("/organization"),
          }}
        />
      );
    }
    ```

    <Accordion title="Full integration example">
      ```tsx wrap lines theme={null}
      import React from "react";
      import { OrganizationDetailsEdit } from "@/components/auth0/my-organization/organization-details-edit";
      import { Auth0Provider } from "@auth0/auth0-react";
      import { Auth0ComponentProvider } from "@auth0/universal-components-react/spa";
      import { useNavigate } from "react-router-dom";
      import { analytics } from "./lib/analytics";

      function OrganizationSettingsPage() {
        const navigate = useNavigate();

        const handleSaveSuccess = (org) => {
          analytics.track("Organization Updated", {
            name: org.name,
            displayName: org.display_name,
          });
          navigate("/organization");
        };

        return (
          <div className="max-w-2xl mx-auto p-6">
            <OrganizationDetailsEdit
              schema={{
                details: {
                  displayName: {
                    required: true,
                    maxLength: 100,
                  },
                  color: {
                    regex: /^#[0-9A-Fa-f]{6}$/,
                    errorMessage: "Enter a valid hex color",
                  },
                },
              }}
              saveAction={{
                onBefore: (org) => {
                  return confirm(`Save changes to "${org.display_name}"?`);
                },
                onAfter: handleSaveSuccess,
              }}
              cancelAction={{
                onBefore: () => confirm("Discard unsaved changes?"),
                onAfter: () => navigate("/organization"),
              }}
              backButton={{
                onClick: () => navigate("/organization"),
              }}
              customMessages={{
                header: {
                  title: "Organization Settings",
                },
                notifications: {
                  save_success: "Settings saved successfully!",
                },
              }}
              styling={{
                variables: {
                  common: {
                    "--color-primary": "#059669",
                  },
                },
                classes: {
                  "OrganizationDetailsEdit-form": "shadow-xl rounded-lg",
                },
              }}
            />
          </div>
        );
      }

      export default function App() {
        const domain = "your-domain.auth0.com";
        const clientId = "your-client-id";

        return (
          <Auth0Provider
            domain={domain}
            clientId={clientId}
            authorizationParams={{
              redirect_uri: window.location.origin,
            }}
            interactiveErrorHandler="popup" // Required to handle step-up auth challenges via Universal Login popup
          >
            <Auth0ComponentProvider domain={domain}>
              <OrganizationSettingsPage />
            </Auth0ComponentProvider>
          </Auth0Provider>
        );
      }

      ```
    </Accordion>

    ## Props

    ### Core props

    Core props are fundamental to the component's operation. `OrganizationDetailsEdit` has no required props—it automatically loads the current organization's details from the My Organization API.

    ***

    ### Display props

    Display props control how the component renders without affecting its behavior. Use these to hide sections or enable read-only mode.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>readOnly</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Disable all form inputs. Default: <code>false</code>
          </td>
        </tr>

        <tr>
          <td>
            <code>hideHeader</code>
          </td>

          <td>
            <code>boolean</code>
          </td>

          <td>
            Hide the header section. Default: <code>false</code>
          </td>
        </tr>
      </tbody>
    </table>

    ***

    ### Action props

    Action props handle user interactions and define what happens when users save or cancel changes. Use lifecycle hooks (`onBefore`, `onAfter`) to integrate with your application's routing and analytics.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>saveAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Save changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>cancelAction</code>
          </td>

          <td>
            <code>ComponentAction\<OrganizationPrivate></code>
          </td>

          <td>
            Cancel/discard changes action.
          </td>
        </tr>

        <tr>
          <td>
            <code>backButton</code>
          </td>

          <td>
            <code>Object</code>
          </td>

          <td>
            Back button configuration.
          </td>
        </tr>
      </tbody>
    </table>

    **saveAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the save flow when users submit organization changes. Use `onAfter` to navigate away after successful save.

    **Properties:**

    * `disabled`—Disable the save button (for example, while another operation is in progress)
    * `onBefore(data)`—Runs before the save operation. Return `false` to prevent saving (for example, to show a confirmation dialog first).
    * `onAfter(data)`—Runs after the organization is successfully saved. Use this to navigate away or track the event.

    **Common Patterns:**

    ```tsx wrap lines theme={null}
    // Navigate back after saving
    saveAction={{
      onAfter: () => navigate("/organization"),
    }}

    // Add confirmation before saving
    saveAction={{
      onBefore: (org) => {
        return confirm(`Save changes to "${org.display_name}"?`);
      },
      onAfter: () => navigate("/organization"),
    }}

    // Track analytics on save
    saveAction={{
      onAfter: (org) => {
        analytics.track("Organization Updated", {
          name: org.name,
          displayName: org.display_name,
        });
        navigate("/organization");
      },
    }}
    ```

    ***

    **cancelAction**

    **Type:** `ComponentAction<OrganizationPrivate>`

    Controls the cancel/discard flow. Use this action to manage discarded changes.

    **Properties:**

    * `disabled`—Disable the cancel button
    * `onBefore(data)`—Runs before the cancel action. Return `false` to prevent cancellation (for example, to confirm discarding unsaved changes).
    * `onAfter(data)`—Runs after the cancel is confirmed. Use this to navigate away from the form.

    **Example:**

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      cancelAction={{
        onBefore: (org) => {
          return confirm("Discard unsaved changes?");
        },
        onAfter: () => navigate("/organization"),
      }}
    />
    ```

    ***

    **backButton**

    **Type:** `{ icon?: LucideIcon; onClick: (e: MouseEvent) => void }`

    Configures the back button in the component header. Use this to navigate back to your organization overview or the previous page.

    **Properties:**

    * `icon`—Custom Lucide icon component (optional, defaults to ArrowLeft)
    * `onClick`—Click handler for navigation

    **Example:**

    ```tsx wrap lines theme={null}
    import { ChevronLeft } from "lucide-react";

    <OrganizationDetailsEdit
      backButton={{
        icon: ChevronLeft,
        onClick: () => navigate("/organization"),
      }}
    />;
    ```

    ***

    ### Customization props

    Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.

    <table class="table">
      <thead>
        <tr>
          <th>Prop</th>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>schema</code>
          </td>

          <td>
            <code>OrganizationDetailsEditSchemas</code>
          </td>

          <td>
            Field validation rules.
          </td>
        </tr>

        <tr>
          <td>
            <code>customMessages</code>
          </td>

          <td>
            <code>Partial\<OrganizationDetailsEditMessages></code>
          </td>

          <td>
            i18n text overrides.
          </td>
        </tr>

        <tr>
          <td>
            <code>styling</code>
          </td>

          <td>
            <code>ComponentStyling\<OrganizationEditClasses></code>
          </td>

          <td>
            CSS variables and class overrides.
          </td>
        </tr>
      </tbody>
    </table>

    **schema**

    Set custom validation rules for organization detail fields.

    <Accordion title="Available Schema Fields">
      All schema fields support: `regex`, `errorMessage`, `minLength`, `maxLength`, `required`

      **details.name**—Organization internal name
      **details.displayName**—Organization display name
      **details.color**—Brand color (hex format)
      **details.logoURL**—Logo URL
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      schema={{
        details: {
          name: {
            minLength: 3,
            maxLength: 50,
            regex: /^[a-zA-Z0-9-_]+$/,
            errorMessage: "Name must be alphanumeric with hyphens/underscores",
          },
          displayName: {
            required: true,
            maxLength: 100,
          },
          color: {
            regex: /^#[0-9A-Fa-f]{6}$/,
            errorMessage: "Enter a valid hex color (e.g., #FF5500)",
          },
          logoURL: {
            regex: /^https:\/\/.+/,
            errorMessage: "Logo URL must use HTTPS",
          },
        },
      }}
    />
    ```

    ***

    **customMessages**

    Customize all text and translations. All fields are optional and use defaults if not provided.

    <Accordion title="Available Messages">
      **header**—Component header

      * `title`, `description`, `back_button_text`

      **form**—Form fields

      * `fields.name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.display_name`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.color`—`label`, `placeholder`, `helper_text`, `error`
      * `fields.logo_url`—`label`, `placeholder`, `helper_text`, `error`

      **actions**—Button labels

      * `save_button_text`, `cancel_button_text`

      **notifications**—API responses

      * `save_success`, `save_error`, `general_error`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      customMessages={{
        header: {
          title: "Edit Organization",
          description: "Update your organization's settings",
        },
        form: {
          fields: {
            name: {
              label: "Organization ID",
              helper_text: "Internal identifier (cannot be changed after creation)",
            },
            display_name: {
              label: "Organization Name",
              placeholder: "Enter display name",
            },
          },
        },
        notifications: {
          save_success: "Organization updated successfully!",
        },
      }}
    />
    ```

    ***

    **styling**

    Customize appearance with CSS variables and class overrides. Supports theme-aware styling.

    <Accordion title="Available Styling Options">
      **Variables**—CSS custom properties

      * `common`—Applied to all themes
      * `light`—Light theme only
      * `dark`—Dark theme only

      **Classes**—Component class overrides

      * `OrganizationDetailsEdit-header`
      * `OrganizationDetailsEdit-form`
      * `OrganizationDetailsEdit-actions`
    </Accordion>

    ```tsx wrap lines theme={null}
    <OrganizationDetailsEdit
      styling={{
        variables: {
          common: {
            "--font-size-title": "1.5rem",
          },
          light: {
            "--color-primary": "#059669",
          },
        },
        classes: {
          "OrganizationDetailsEdit-form": "shadow-lg rounded-xl p-6",
        },
      }}
    />
    ```

    ***

    ## Advanced customization

    The `OrganizationDetailsEdit` component is composed of smaller subcomponents and hooks. You can import them individually to build custom organization editing workflows if you use shadcn.

    ### Available subcomponents

    For advanced use cases, you can import individual subcomponents to build custom organization editing interfaces.

    <table class="table">
      <thead>
        <tr>
          <th>Component</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>OrganizationForm</code>
          </td>

          <td>Main form component with all fields</td>
        </tr>

        <tr>
          <td>
            <code>ColorPickerField</code>
          </td>

          <td>Color picker for brand color selection</td>
        </tr>

        <tr>
          <td>
            <code>LogoUploadField</code>
          </td>

          <td>Logo upload and management field</td>
        </tr>
      </tbody>
    </table>

    ### Available hooks

    These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.

    <table class="table">
      <thead>
        <tr>
          <th>Hook</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>
            <code>useOrganizationDetailsEdit</code>
          </td>

          <td>Organization data fetching and editing logic</td>
        </tr>

        <tr>
          <td>
            <code>useOrganizationDetailsEditLogic</code>
          </td>

          <td>Form state and action handlers</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>
