@uportal/user-profile-menu
v1.40.2
Published
[](https://www.npmjs.com/package/@uportal/user-profile-menu) [.
Notice
We have a /proxy/ leading the oidc-url attribute. This is a developer convenience to be able to query against your local running instance of uPortal. The proxy is configured in package.json:
"proxy": {
"/proxy": {
"target": "http://localhost:8080",
"changeOrigin": true,
"pathRewrite": {
"^/proxy": "/"
}
}
},Attributes
<user-profile-menu> takes the following attributes:
oidc-url
Url to connect to oidc. The default for this value is /uPortal/api/v5-1/userinfo.
<user-profile-menu oidc-url="/uPortal/api/v5-1/userinfo"></user-profile-menu>use-initials
Tells the component to ignore the user's image and use the initials from first_name and given_name.
<user-profile-menu use-initials="true"></user-profile-menu>Theming
Currently this component supports CSS Variables for overriding button colors. Defining the following variables will change the colors for the component accordingly. They will fall back to the colors described below.
You should define this in your custom stylesheet.
fg = foreground (text) bg = background
:root {
--user-prof-avatar-size: 30px; // size of avatar in navbar
--user-prof-menu-fg-color: #495057;
--user-prof-fg-color: #ffffff; // color of user name text
--user-prof-fallback-bg-color: #cccccc; // color of fallback/initial background
--user-prof-fallback-fg-color: #333333; // color of fallback/initial text
--user-prof-header-bg-color: #eee; // color used by headers/footers
--user-prof-header-fg-color: #000; // color used by headers/footers
}