eds-user

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

eds-user Open in Storybook

See It in Use with Code

Check out this practical implementation of component.

Content placed inside <eds-user> (e.g. account links or a logout button) is rendered in the default slot, below the user details in the dropdown.

Directly in HTML

In React

In Vue

Overview

EdsUser is a user component for managing and displaying the user’s auth information. Displays a user dropdown menu when authenticated.

This component is ideal for embedding into any layout requiring user authentication.

Properties

PropertyAttributeDescriptionTypeDefault
dropdownLabeldropdown-labelstring'Account'
intentintentVisual intent of the trigger button"brand" | "ghost" | "primary" | "secondary"'ghost'
useruserThe user object containing user information, or a JSON string to be parsed.User | stringundefined

Methods

closeDropdown() => Promise<void>

Returns

Type: Promise<void>

Dependencies

Depends on

Graph

graph TD;
  eds-user --> eds-dropdown
  eds-user --> eds-avatar
  eds-dropdown --> eds-button
  eds-button --> eds-icon-wrapper
  eds-avatar --> eds-img
  style eds-user fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS