@startupjs-ui/menu 0.1.12 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.mdx +15 -7
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/menu
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
15
+
16
+ **Note:** Version bump only for package @startupjs-ui/menu
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
7
23
 
8
24
  **Note:** Version bump only for package @startupjs-ui/menu
package/README.mdx CHANGED
@@ -11,7 +11,9 @@ import { Sandbox } from '@startupjs-ui/docs'
11
11
 
12
12
  Inherits [Div props](/docs/components/Div).
13
13
 
14
- Menu displays a list of choices and also can be used for navigation.
14
+ Menu displays a list of choices on screen. It can be used for navigation, selecting options, or organizing actions into a vertical or horizontal list.
15
+
16
+ Each item in the menu is a `Menu.Item`. Items can be marked as active, display icons, act as navigation links, and be styled with custom colors.
15
17
 
16
18
  ```jsx
17
19
  import { Menu } from 'startupjs-ui'
@@ -19,6 +21,8 @@ import { Menu } from 'startupjs-ui'
19
21
 
20
22
  ## Simple example
21
23
 
24
+ At its simplest, a Menu contains a set of `Menu.Item` children. Track which item is active using component state and the `active` prop.
25
+
22
26
  ```jsx example
23
27
  const [active, setActive] = useState('option-1')
24
28
  return (
@@ -41,7 +45,7 @@ return (
41
45
 
42
46
  ## Highlighted active item
43
47
 
44
- By default the active menu item is not highlighted. To highlight it use the `activeBorder` property.
48
+ By default, the active menu item has no visible border highlight. Use the `activeBorder` prop on the `Menu` component to add a colored border to whichever item is currently active. Supported positions are `'top'`, `'bottom'`, `'left'`, and `'right'`.
45
49
 
46
50
  ```jsx example
47
51
  const [active, setActive] = useState('option-1')
@@ -71,7 +75,7 @@ return (
71
75
 
72
76
  ## Horizontal menu
73
77
 
74
- By default the menu shows vertically. To make it horizontal, you need pass the string `horizontal` to the `variant` property.
78
+ By default, the menu is laid out vertically. Set `variant='horizontal'` to arrange items in a row instead.
75
79
 
76
80
  ```jsx example
77
81
  const [active, setActive] = useState('option-1')
@@ -101,7 +105,7 @@ return (
101
105
 
102
106
  ## Menu item icon
103
107
 
104
- To display icon in menu item pass the `icon` property to it. Position of icon can be changed by passing `iconPosition` to `Menu` component (`left` by default) and can be override in menu item.
108
+ Pass the `icon` prop to a `Menu.Item` to display an icon alongside its label. The icon position defaults to `'left'` but can be changed by setting `iconPosition` on the `Menu` (which applies to all items) or on an individual `Menu.Item` (which overrides the parent setting).
105
109
 
106
110
  ```jsx example
107
111
  const [active, setActive] = useState('option-1')
@@ -134,7 +138,11 @@ return (
134
138
 
135
139
  ## Change color of active item
136
140
 
137
- By default, the active menu item has a `primary` color. Use the `activeColor` property to set the desired color for the active element. This property will also change the color of border and icon (if you passed an `activeBorder` property for a Menu or an `icon` for a Menu.Item). `activeColor` accepts color as a string which will be compatible with the CSS color property.(ex. `red`, `#fff`, `rgb(123, 23, 122)`)
141
+ By default, the active menu item uses the `primary` theme color. Use the `activeColor` prop to apply a custom color to the active item's text, icon, and border. It accepts any valid CSS color value (e.g. `'red'`, `'#fff'`, `'rgb(123, 23, 122)'`).
142
+
143
+ You can also use the `color` prop on individual `Menu.Item` components to override the default text and icon color for inactive items.
144
+
145
+ To render item text in bold, pass the `bold` prop to `Menu.Item`.
138
146
 
139
147
  ```jsx example
140
148
  const [active, setActive] = useState('option-1')
@@ -171,7 +179,7 @@ return (
171
179
 
172
180
  ## Menu item as link
173
181
 
174
- Sometimes you want using menu item as link, for example in navigation menu. See below how you can do this.
182
+ Use the `to` prop on `Menu.Item` to turn it into a navigation link. This is useful for building navigation menus where each item routes to a different page.
175
183
 
176
184
  ```jsx example
177
185
  const { usePathname } = useRouter()
@@ -195,7 +203,7 @@ return pug`
195
203
 
196
204
  ## Complex interaction (integration with other components)
197
205
 
198
- An example of a collapsible menu with submenus nested in.
206
+ This example shows a collapsible menu with nested submenus, built by combining Menu with the Collapse component. You can pass custom `style` and `containerStyle` props to fine-tune the layout.
199
207
 
200
208
  ```jsx example
201
209
  const [showMenu, setShowMenu] = useState(true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/menu",
3
- "version": "0.1.12",
3
+ "version": "0.1.16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,15 +9,15 @@
9
9
  "type": "module",
10
10
  "dependencies": {
11
11
  "@startupjs-ui/core": "^0.1.11",
12
- "@startupjs-ui/div": "^0.1.12",
13
- "@startupjs-ui/icon": "^0.1.11",
14
- "@startupjs-ui/item": "^0.1.12",
15
- "@startupjs-ui/span": "^0.1.12"
12
+ "@startupjs-ui/div": "^0.1.16",
13
+ "@startupjs-ui/icon": "^0.1.16",
14
+ "@startupjs-ui/item": "^0.1.16",
15
+ "@startupjs-ui/span": "^0.1.16"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": "*",
19
19
  "react-native": "*",
20
20
  "startupjs": "*"
21
21
  },
22
- "gitHead": "c0b4606437077bb6d170e2c0b16b674801c304fe"
22
+ "gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
23
23
  }