List API
Import
Section titled “Import”Cimpress UI exports two list-related components:
OrderedList: represents an ordered list of items, rendered as a numbered listUnorderedList: represents an unordered list of items, rendered as a bulleted list
import { OrderedList, UnorderedList } from '@cimpress-ui/react';Text style
Section titled “Text style”List text style can be customized using text style properties. All text and link content within a list will inherit the list style.
Please address the following errors:
- Password should be at least 8 characters long.
- Password should contain a special character.
import { ListItem, Stack, Text, UnorderedList } from '@cimpress-ui/react';
export default function Demo() { return ( <Stack gap={8}> <Text as="p" tone="critical" variant="small"> Please address the following errors: </Text> <UnorderedList tone="critical" variant="small"> <ListItem>Password should be at least 8 characters long.</ListItem> <ListItem>Password should contain a special character.</ListItem> </UnorderedList> </Stack> );}API reference
Section titled “API reference”OrderedList
Section titled “OrderedList”Renders an ordered list of text items in a specified style.
- Ref<HTMLOListElement>
-
The
reftype for this component.
OrderedListProps
- ReactNode
children *
Section titled “ children * ” -
Text to display. Allows nesting other typography components.
- string
-
The element's unique identifier. See MDN.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.
- string
aria-label
Section titled “ aria-label ” -
Defines a string value that labels the current element.
- string
aria-labelledby
Section titled “ aria-labelledby ” -
Identifies the element (or elements) that labels the current element.
- string
aria-describedby
Section titled “ aria-describedby ” -
Identifies the element (or elements) that describes the object.
- string
aria-details
Section titled “ aria-details ” -
Identifies the element (or elements) that provide a detailed, extended description for the object.
- number
startFrom
Section titled “ startFrom ” -
An integer to start numbering list items from.
- 'small' | 'medium' | 'title-1' | 'title-2' | 'title-3' | 'title-4' | 'title-5' | 'title-6' | 'body' | 'body-semibold' | 'medium-semibold' | 'small-semibold'
variant
Section titled “ variant ” -
Determines the visual variant of text.
- 'normal' | 'italic'
fontStyle
Section titled “ fontStyle ” -
Whether the font should be styled with a normal or italic face.
- 'none' | 'underline' | 'strikethrough'
textDecoration
Section titled “ textDecoration ” -
The kind of decorative line applied to the text.
- ForegroundTone
-
Determines the color tone of the text.
StyleProps
- Responsive<Spacing | "auto">
margin
Section titled “ margin ” -
The amount of margin applied to all edges of this component.
- Responsive<Spacing | "auto">
marginX
Section titled “ marginX ” -
The amount of margin applied to the left and right edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginY
Section titled “ marginY ” -
The amount of margin applied to the top and bottom edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginTop
Section titled “ marginTop ” -
The amount of margin applied to the top edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginRight
Section titled “ marginRight ” -
The amount of margin applied to the right edge of this component. Takes priority over
marginXandmargin. - Responsive<Spacing | "auto">
marginBottom
Section titled “ marginBottom ” -
The amount of margin applied to the bottom edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginLeft
Section titled “ marginLeft ” -
The amount of margin applied to the left edge of this component. Takes priority over
marginXandmargin.
UnorderedList
Section titled “UnorderedList”Renders an unordered list of text items in a specified style.
- Ref<HTMLUListElement>
-
The
reftype for this component.
UnorderedListProps
- ReactNode
children *
Section titled “ children * ” -
Text to display. Allows nesting other typography components.
- string
-
The element's unique identifier. See MDN.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.
- string
aria-label
Section titled “ aria-label ” -
Defines a string value that labels the current element.
- string
aria-labelledby
Section titled “ aria-labelledby ” -
Identifies the element (or elements) that labels the current element.
- string
aria-describedby
Section titled “ aria-describedby ” -
Identifies the element (or elements) that describes the object.
- string
aria-details
Section titled “ aria-details ” -
Identifies the element (or elements) that provide a detailed, extended description for the object.
- 'small' | 'medium' | 'title-1' | 'title-2' | 'title-3' | 'title-4' | 'title-5' | 'title-6' | 'body' | 'body-semibold' | 'medium-semibold' | 'small-semibold'
variant
Section titled “ variant ” -
Determines the visual variant of text.
- 'normal' | 'italic'
fontStyle
Section titled “ fontStyle ” -
Whether the font should be styled with a normal or italic face.
- 'none' | 'underline' | 'strikethrough'
textDecoration
Section titled “ textDecoration ” -
The kind of decorative line applied to the text.
- ForegroundTone
-
Determines the color tone of the text.
StyleProps
- Responsive<Spacing | "auto">
margin
Section titled “ margin ” -
The amount of margin applied to all edges of this component.
- Responsive<Spacing | "auto">
marginX
Section titled “ marginX ” -
The amount of margin applied to the left and right edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginY
Section titled “ marginY ” -
The amount of margin applied to the top and bottom edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginTop
Section titled “ marginTop ” -
The amount of margin applied to the top edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginRight
Section titled “ marginRight ” -
The amount of margin applied to the right edge of this component. Takes priority over
marginXandmargin. - Responsive<Spacing | "auto">
marginBottom
Section titled “ marginBottom ” -
The amount of margin applied to the bottom edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginLeft
Section titled “ marginLeft ” -
The amount of margin applied to the left edge of this component. Takes priority over
marginXandmargin.