Bixby Developer Center

References

highlights

optional

Highlight specific results on the first page of a rendered list in result-view and input-view of a selection list. Specifying an empty highlights block tells Bixby to automatically determine your highlights.

Bixby only displays up to three highlights, depending on which ones return a result first. This is true regardless of the number of highlights you specify.

Note

Ensure that you use a card component when displaying the highlighted choices.

Note

If you use a macro or layout-match in this key, ensure that the components you specify in that separate layout are all allowed under the highlights key.

Note

If you want the user to see further details when selecting one of the highlighted items, you need to define the view-for key in the appropriate card component within the layout.

Examples

The following example uses a result-view:

result-view {
match {
Movie (results)
}
message {
if (size(results) == 0) {
template ("#{event(results, 'NoResult')}")
} else {
template ("#{event(results, 'Result')}")
}
}
render {
if (size(results) == 1) {
macro (MOVIE_DETAILS) {
param (movie) {
expression (results)
}
}
}
else-if (size(results) > 1) {
list-of (results) {
navigation-mode {
if ($handsFree) {
read-one {
list-summary {
template ("#{event(results, 'Result')}")
}
page-content {
item-selection-question {
macro (HANDS_FREE_MOVIE_ITEM_SELECTION_QUESTION)
}
overflow-statement {
macro (HANDS_FREE_MOVIE_OVERFLOW_STATEMENT)
}
overflow-question {
macro (HANDS_FREE_MOVIE_OVERFLOW_QUESTION)
}
underflow-statement {
macro (HANDS_FREE_MOVIE_UNDERFLOW_STATEMENT)
}
}
}
}
}
highlights {
select (pick) {
label {
macro (MOVIE_HIGHLIGHT_LABEL)
}
macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (pick)
}
}
summary {
macro (HANDS_FREE_MOVIE_HIGHLIGHT_SUMMARY) {
param (movie) {
expression (pick)
}
}
}
}
}
where-each (result) {
if ($handsFree) {
macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (result)
}
}
}
else {
macro (MOVIE_SUMMARY) {
param (movie) {
expression (result)
}
}
}
spoken-summary {
macro (HANDS_FREE_MOVIE_NORMAL_SUMMARY) {
param (movie) {
expression (result)
}
}
}
}
}
}
}
}

View master on GitHub

The following example uses an input-view:

input-view {
match: MovieGenre (candidates)
message {
macro (MOVIE_GENRE_SELECTION_PROMPT)
}
render {
selection-of (candidates) {
where-each (candidate) {
macro (MOVIE_GENRE_SUMMARY) {
param (genre) {
expression (candidate)
}
}
}
highlights {
select (pick) {
summary {
macro (MOVIE_GENRE_HIGHLIGHT_SPOKEN_SUMMARY) {
param (movieGenre) {
expression (pick)
}
}
}
label {
macro (MOVIE_GENRE_HIGHLIGHT_LABEL_TODAY)
}
macro (MOVIE_GENRE_SUMMARY) {
param (genre) {
expression (pick)
}
}
// Distribute the 8 genres that can appeal to general audiences across different days
filter-by (exists(now().date.day) && now().date.day % 8 == 0 ? pick == 'Mystery' : now().date.day % 8 == 1 ? pick == 'Adventure' : now().date.day % 8 == 2 ? pick == 'Action' : now().date.day % 8 == 3 ? pick == 'Fantasy' : now().date.day % 8 == 4 ? pick == 'ScienceFiction' : now().date.day % 8 == 5 ? pick == 'Comedy' : now().date.day % 8 == 6 ? pick == 'Documentary' : pick == 'Music')
}
}
}
}
conversation-drivers {
conversation-driver {
macro (PLAY_GENRE_QUIZ_CONVO_DRIVER)
}
}
}

View master on GitHub

You can run the sample capsule in the Simulator to see how this component displays on different devices, if supported.

Child Keys

select
optional
Determines which item to highlight within the list and what information to display to user about this item