SharedSamples.org
Aaron Miao
Community Contributor

Aaron Miao

@aaronmi

4 samples featured.

4 Contributions
1 Collection
List Formatting Column Formatting: 4
View Aaron Miao on GitHub ↗

Contributions

Samples by Aaron Miao currently indexed on SharedSamples.org.

ISBN to Book Cover Image preview
Column Formatting
ISBN to Book Cover Image
This example retrieves book cover images based on their ISBN numbers by utilizing the Open Library Covers API. The API works by building a cover image URL with the ISBN.
View sample details →
Multi-line Text with Word Wrap preview
Column Formatting
Multi-line Text with Word Wrap
With modern document libraries and lists, lengthy multi-line fields no longer show text in full (a fade is provided). This isn't always desired, so this sample demonstrates rending long text to mutilple lines with word wrap, similar to classic mode.
View sample details →
Pie Chart preview
Column Formatting
Pie Chart
This example renders whole pie in neutralLight with radius 50 and the number% (column value) as a slice of the pie in blue using `<svg>` with `<path>` tags. The number% displayed at the bottom of the pie in neutralPrimary.
View sample details →
Yes/No Checkmark preview
Column Formatting
Yes/No Checkmark
You can apply conditional formatting to Yes/No fields. This sample applies different classes depending on whether the value of the field is Yes (true), No (false), or Blank. This example applies one of the column formatting predefined classes (sp-field-severity--good, sp-field-severity--low, or sp-field-severity--blocked) to the root <div /> based on the field's value. This is what determines the element's background color. A class of `ms-fontColor-neutralSecondary` is always applied to ensure the text color is legible in both light and dark themes. Then, it outputs a <span /> element with an iconName attribute that shows a Fluent UI icon inside that element.
View sample details →