OudsBulletList
fun OudsBulletList(modifier: Modifier = Modifier, type: OudsBulletListType = OudsBulletListDefaults.Type, textStyle: OudsBulletListTextStyle = OudsBulletListDefaults.TextStyle, builder: OudsBulletListBuilder.() -> Unit)
Bullet list is a UI element that helps to view in related individual text items grouped together; items usually starting with a number or a bullet.
Bullet list is also known as “Unordered list” or “Ordered list” and is not an interactive element by default, although text items can support hypertext links.
Design
| Guidelines | unified-design-system.orange.com |
| Version | 1.0.0 |
Parameters
modifier
Modifier applied to the list.
type
The visual type of the list (e.g., ordered, unordered, bare). See OudsBulletListType.
textStyle
The typography style for the list items. See OudsBulletListTextStyle.
builder
A lambda scope using the OudsBulletListBuilder to define the list items.
Samples
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.PreviewLightDark
import com.orange.ouds.core.component.OudsBulletList
import com.orange.ouds.core.component.OudsBulletListFontSize
import com.orange.ouds.core.component.OudsBulletListFontWeight
import com.orange.ouds.core.component.OudsBulletListTextStyle
import com.orange.ouds.core.component.OudsBulletListType
import com.orange.ouds.core.utilities.OudsPreview
fun main() {
//sampleStart
OudsBulletList {
item(label = "Milk")
item(label = "Vegetables", subListType = OudsBulletListType.Unordered(brandColor = false)) {
item(label = "Tomatoes")
item(
label = "Salad",
subListTextStyle = OudsBulletListTextStyle(
fontSize = OudsBulletListFontSize.BodyLarge,
fontWeight = OudsBulletListFontWeight.Normal
)
) {
item(label = "Lettuce")
item(label = "Arugula")
}
}
}
//sampleEnd
}import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.PreviewLightDark
import com.orange.ouds.core.component.OudsBulletList
import com.orange.ouds.core.component.OudsBulletListFontSize
import com.orange.ouds.core.component.OudsBulletListFontWeight
import com.orange.ouds.core.component.OudsBulletListTextStyle
import com.orange.ouds.core.component.OudsBulletListType
import com.orange.ouds.core.utilities.OudsPreview
fun main() {
//sampleStart
OudsBulletList(type = OudsBulletListType.Ordered) {
item(label = "Prepare the ingredients")
item(label = "Cook the pasta") {
item(label = "Boil water in a large pot")
item(
label = "Add salt and then the pasta",
subListTextStyle = OudsBulletListTextStyle(
fontSize = OudsBulletListFontSize.BodyLarge,
fontWeight = OudsBulletListFontWeight.Normal
)
) {
item(label = "Cook for 8-10 minutes")
item(label = "Stir occasionally")
}
}
item(label = "Drain the pasta and serve")
}
//sampleEnd
}import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.PreviewLightDark
import com.orange.ouds.core.component.OudsBulletList
import com.orange.ouds.core.component.OudsBulletListFontSize
import com.orange.ouds.core.component.OudsBulletListFontWeight
import com.orange.ouds.core.component.OudsBulletListTextStyle
import com.orange.ouds.core.component.OudsBulletListType
import com.orange.ouds.core.utilities.OudsPreview
fun main() {
//sampleStart
OudsBulletList(type = OudsBulletListType.Bare) {
item(label = "Event Planning")
item(
label = "Logistic Team",
subListTextStyle = OudsBulletListTextStyle(
fontSize = OudsBulletListFontSize.BodyLarge,
fontWeight = OudsBulletListFontWeight.Normal
)
) {
item(label = "Venue Booking")
item(label = "Catering")
}
item(
label = "Communication Team",
subListTextStyle = OudsBulletListTextStyle(
fontSize = OudsBulletListFontSize.BodyLarge,
fontWeight = OudsBulletListFontWeight.Normal
)
) {
item(label = "Invitations")
item(label = "Social Media")
}
}
//sampleEnd
}