Hiyve Components - v1.0.0
    Preparing search index...

    Interface JoinWithTokenFormProps

    Props for the JoinWithTokenForm component.

    This component provides a form for joining a room via an invite link. It uses the useJoinToken hook internally to handle token validation and room joining.

    function JoinPage() {
    const searchParams = new URLSearchParams(window.location.search);
    const joinToken = searchParams.get('joinToken');
    const region = searchParams.get('region');

    if (!joinToken || !region) {
    return <div>Invalid invite link</div>;
    }

    return (
    <JoinWithTokenForm
    joinToken={joinToken}
    region={region}
    onJoinSuccess={() => console.log('Joined!')}
    onCreateRoom={() => window.location.href = '/'}
    />
    );
    }
    interface JoinWithTokenFormProps {
        autoValidate?: boolean;
        colors?: Partial<JoinWithTokenFormColors>;
        icons?: Partial<JoinWithTokenFormIcons>;
        initialUserName?: string;
        joinToken: string;
        labels?: Partial<JoinWithTokenFormLabels>;
        minNameLength?: number;
        onCreateRoom?: () => void;
        onJoinSuccess?: () => void;
        onUserNameChange?: (name: string) => void;
        region: string;
        styles?: Partial<JoinWithTokenFormStyles>;
        sx?: SxProps<Theme>;
        userNameStorageKey?: string;
    }
    Index

    Properties

    autoValidate?: boolean

    Auto-validate token on mount

    colors?: Partial<JoinWithTokenFormColors>

    Custom colors

    icons?: Partial<JoinWithTokenFormIcons>

    Custom icons

    initialUserName?: string

    Initial user name value

    joinToken: string

    Join token from the invite link

    labels?: Partial<JoinWithTokenFormLabels>

    Custom labels for i18n support

    minNameLength?: number

    Minimum name length required

    onCreateRoom?: () => void

    Callback when user clicks "create room" link

    onJoinSuccess?: () => void

    Callback when room is successfully joined

    onUserNameChange?: (name: string) => void

    Callback when user name changes

    region: string

    Region from the invite link

    styles?: Partial<JoinWithTokenFormStyles>

    Custom styles

    sx?: SxProps<Theme>

    MUI sx prop for container styling

    userNameStorageKey?: string

    LocalStorage key for persisting user name