https://www.linkedin.com/pulse/consumer-semantic-theme-design-ai-sasha-firsov-iy5pc
It is often difficult to find partnets on rare subjects and ideas which is not (yet?) popular. AI become a handy tool in bottle neck of communication limit. Here is a session for naming convension for Cunsumer-centric vocabulary UI theme. The result is a part of Semantic Theme for <custom-element>, a no-JS web app development stack.
Buttons, links, and some other HTML elements and web components lead to change the web page URL. Some of them activated by default when ENTER key is hit on the page. Seleral other kind act by explicit invocation. Few others could lead to dangerous action. Some needs a special attention to th context and blended into contect, like actions in toolbar or menu items. Give few naming ideas for such action variations and generic name for all
given an `Action` web component name, suggest the attribute name to associate the action variation as ^^.
Given the generic name Action
, here are clear, concise, and intuitive attribute names you can use to associate action variations in your web component:
Recommended Generic Attribute Name:
-
variant (common, clear, widely used)
Alternative Names:
-
type
-
kind
-
mode
-
action-type
Example Usage:
Full Example with Suggested Names:
Using variant
as the attribute name clearly indicates it's about variations of the generic Action component, making it intuitive for developers and easy to maintain.
compare proposed with `intent` or `flow`
Here's a clear comparison between the previously proposed variant
, and your new suggestions: intent
and flow
.
1. variant
-
Meaning:
Clearly indicates multiple styles, forms, or categories of a component. -
Common Usage:
Widely used for components with multiple visual or functional versions, emphasizing different "forms." -
Example Usage:
-
Pros:
-
Widely accepted in UI libraries (e.g., Material UI, Bootstrap, Tailwind UI).
-
Immediately recognizable to developers.
-
-
Cons:
-
Slightly emphasizes visual/style more than functional/behavioral intent.
-
2. intent
-
Meaning:
Highlights the purpose, outcome, or intended result of an action. Common in semantic designs. -
Common Usage:
Often used to specify the semantic meaning or intended action (e.g., danger, success, navigation). -
Example Usage:
-
Pros:
-
Strong semantic clarity: explicitly communicates behavioral intention.
-
Good alignment with semantic UI patterns.
-
-
Cons:
-
Less commonly seen in traditional UI libraries as a standard attribute.
-
3. flow
-
Meaning:
Emphasizes the resulting user-flow, behavior, or navigation path triggered by the action. -
Common Usage:
Often applied when emphasizing user journey or workflow. -
Example Usage:
-
Pros:
-
Clearly indicates the functional pathway or the journey initiated.
-
Useful when specifically targeting complex workflows or multi-step interactions.
-
-
Cons:
-
Less clear when the component's actions are single-step or immediately destructive.
-
Uncommon usage for actions categorized primarily by intent or style.
-
Recommendation based on scenarios:
-
For visual/form-focused UI libraries:
👉 Usevariant
-
For semantic or explicitly intent-focused designs:
👉 Useintent
-
For emphasizing multi-step workflows or complex interaction chains:
👉 Useflow
Overall, intent
is an excellent and meaningful alternative if you want explicit semantic clarity about the intended behavior of actions. variant
remains a reliable and conventional choice if you prefer familiar patterns, whereas flow
is specialized for emphasizing navigation and workflow context.
While I been thinking of "intent" as my choice, now it has a rational basis :)
Thanks, ChatGPT! Happy coding!
No comments:
Post a Comment